mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
@@ -1,13 +1,13 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using FluentAssertions;
|
||||
using Moq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common.Http;
|
||||
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
||||
using NzbDrone.Core.Download;
|
||||
using NzbDrone.Core.Download.Clients.Deluge;
|
||||
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
||||
using NzbDrone.Test.Common;
|
||||
|
||||
namespace NzbDrone.Core.Test.Download.DownloadClientTests.DelugeTests
|
||||
@@ -31,56 +31,56 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DelugeTests
|
||||
};
|
||||
|
||||
_queued = new DelugeTorrent
|
||||
{
|
||||
Hash = "HASH",
|
||||
IsFinished = false,
|
||||
State = DelugeTorrentStatus.Queued,
|
||||
Name = _title,
|
||||
Size = 1000,
|
||||
BytesDownloaded = 0,
|
||||
Progress = 0.0,
|
||||
DownloadPath = "somepath"
|
||||
};
|
||||
{
|
||||
Hash = "HASH",
|
||||
IsFinished = false,
|
||||
State = DelugeTorrentStatus.Queued,
|
||||
Name = _title,
|
||||
Size = 1000,
|
||||
BytesDownloaded = 0,
|
||||
Progress = 0.0,
|
||||
DownloadPath = "somepath"
|
||||
};
|
||||
|
||||
_downloading = new DelugeTorrent
|
||||
{
|
||||
Hash = "HASH",
|
||||
IsFinished = false,
|
||||
State = DelugeTorrentStatus.Downloading,
|
||||
Name = _title,
|
||||
Size = 1000,
|
||||
BytesDownloaded = 100,
|
||||
Progress = 10.0,
|
||||
DownloadPath = "somepath"
|
||||
};
|
||||
{
|
||||
Hash = "HASH",
|
||||
IsFinished = false,
|
||||
State = DelugeTorrentStatus.Downloading,
|
||||
Name = _title,
|
||||
Size = 1000,
|
||||
BytesDownloaded = 100,
|
||||
Progress = 10.0,
|
||||
DownloadPath = "somepath"
|
||||
};
|
||||
|
||||
_failed = new DelugeTorrent
|
||||
{
|
||||
Hash = "HASH",
|
||||
IsFinished = false,
|
||||
State = DelugeTorrentStatus.Error,
|
||||
Name = _title,
|
||||
Size = 1000,
|
||||
BytesDownloaded = 100,
|
||||
Progress = 10.0,
|
||||
Message = "Error",
|
||||
DownloadPath = "somepath"
|
||||
};
|
||||
{
|
||||
Hash = "HASH",
|
||||
IsFinished = false,
|
||||
State = DelugeTorrentStatus.Error,
|
||||
Name = _title,
|
||||
Size = 1000,
|
||||
BytesDownloaded = 100,
|
||||
Progress = 10.0,
|
||||
Message = "Error",
|
||||
DownloadPath = "somepath"
|
||||
};
|
||||
|
||||
_completed = new DelugeTorrent
|
||||
{
|
||||
Hash = "HASH",
|
||||
IsFinished = true,
|
||||
State = DelugeTorrentStatus.Paused,
|
||||
Name = _title,
|
||||
Size = 1000,
|
||||
BytesDownloaded = 1000,
|
||||
Progress = 100.0,
|
||||
DownloadPath = "somepath",
|
||||
IsAutoManaged = true,
|
||||
StopAtRatio = true,
|
||||
StopRatio = 1.0,
|
||||
Ratio = 1.5
|
||||
{
|
||||
Hash = "HASH",
|
||||
IsFinished = true,
|
||||
State = DelugeTorrentStatus.Paused,
|
||||
Name = _title,
|
||||
Size = 1000,
|
||||
BytesDownloaded = 1000,
|
||||
Progress = 100.0,
|
||||
DownloadPath = "somepath",
|
||||
IsAutoManaged = true,
|
||||
StopAtRatio = true,
|
||||
StopRatio = 1.0,
|
||||
Ratio = 1.5
|
||||
};
|
||||
|
||||
Mocker.GetMock<ITorrentFileInfoReader>()
|
||||
@@ -119,7 +119,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DelugeTests
|
||||
.Returns("CBC2F069FE8BB2F544EAE707D75BCD3DE9DCF951".ToLower())
|
||||
.Callback(PrepareClientToReturnQueuedItem);
|
||||
}
|
||||
|
||||
|
||||
protected virtual void GivenTorrents(List<DelugeTorrent> torrents)
|
||||
{
|
||||
if (torrents == null)
|
||||
@@ -134,7 +134,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DelugeTests
|
||||
|
||||
protected void PrepareClientToReturnQueuedItem()
|
||||
{
|
||||
GivenTorrents(new List<DelugeTorrent>
|
||||
GivenTorrents(new List<DelugeTorrent>
|
||||
{
|
||||
_queued
|
||||
});
|
||||
@@ -142,7 +142,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DelugeTests
|
||||
|
||||
protected void PrepareClientToReturnDownloadingItem()
|
||||
{
|
||||
GivenTorrents(new List<DelugeTorrent>
|
||||
GivenTorrents(new List<DelugeTorrent>
|
||||
{
|
||||
_downloading
|
||||
});
|
||||
@@ -150,7 +150,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DelugeTests
|
||||
|
||||
protected void PrepareClientToReturnFailedItem()
|
||||
{
|
||||
GivenTorrents(new List<DelugeTorrent>
|
||||
GivenTorrents(new List<DelugeTorrent>
|
||||
{
|
||||
_failed
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user