Fixed failing tests in DownloadStation.

Taloth Saldono 7 years ago
parent 96108cb758
commit 15bd181f16

@ -610,6 +610,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
[TestCase(DownloadStationTaskStatus.Seeding, DownloadItemStatus.Completed)]
[TestCase(DownloadStationTaskStatus.FilehostingWaiting, DownloadItemStatus.Queued)]
[TestCase(DownloadStationTaskStatus.Waiting, DownloadItemStatus.Queued)]
[TestCase(DownloadStationTaskStatus.Unknown, DownloadItemStatus.Queued)]
public void GetItems_should_return_item_as_downloadItemStatus(DownloadStationTaskStatus apiStatus, DownloadItemStatus expectedItemStatus)
{
GivenSerialNumber();

@ -419,6 +419,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
[TestCase(DownloadStationTaskStatus.Seeding, DownloadItemStatus.Completed)]
[TestCase(DownloadStationTaskStatus.FilehostingWaiting, DownloadItemStatus.Queued)]
[TestCase(DownloadStationTaskStatus.Waiting, DownloadItemStatus.Queued)]
[TestCase(DownloadStationTaskStatus.Unknown, DownloadItemStatus.Queued)]
public void GetItems_should_return_item_as_downloadItemStatus(DownloadStationTaskStatus apiStatus, DownloadItemStatus expectedItemStatus)
{
GivenSerialNumber();

@ -227,7 +227,9 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation
{
switch (torrent.Status)
{
case DownloadStationTaskStatus.Unknown:
case DownloadStationTaskStatus.Waiting:
case DownloadStationTaskStatus.FilehostingWaiting:
return torrent.Size == 0 || GetRemainingSize(torrent) > 0 ? DownloadItemStatus.Queued : DownloadItemStatus.Completed;
case DownloadStationTaskStatus.Paused:
return DownloadItemStatus.Paused;

@ -315,7 +315,9 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation
{
switch (task.Status)
{
case DownloadStationTaskStatus.Unknown:
case DownloadStationTaskStatus.Waiting:
case DownloadStationTaskStatus.FilehostingWaiting:
return task.Size == 0 || GetRemainingSize(task) > 0 ? DownloadItemStatus.Queued : DownloadItemStatus.Completed;
case DownloadStationTaskStatus.Paused:
return DownloadItemStatus.Paused;

Loading…
Cancel
Save