mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-31 03:11:07 +02:00
Fixed failing tests in DownloadStation.
This commit is contained in:
parent
96108cb758
commit
15bd181f16
@ -610,6 +610,7 @@ public void GetItems_should_return_canBeMoved_and_canBeDeleted_as_expected(Downl
|
||||
[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 @@ public void GetItems_should_map_outputpath_for_completed_or_failed_tasks()
|
||||
[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 @@ protected DownloadItemStatus GetStatus(DownloadStationTask torrent)
|
||||
{
|
||||
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 @@ protected DownloadItemStatus GetStatus(DownloadStationTask task)
|
||||
{
|
||||
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…
Reference in New Issue
Block a user