mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-24 22:35:39 -04:00
+29
-29
@@ -33,7 +33,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||
protected DownloadStationTask _multipleFilesCompleted;
|
||||
|
||||
protected string _serialNumber = "SERIALNUMBER";
|
||||
protected string _category ="lidarr";
|
||||
protected string _category = "lidarr";
|
||||
protected string _musicDirectory = @"music/Artist";
|
||||
protected string _defaultDestination = "somepath";
|
||||
protected OsPath _physicalPath = new OsPath("/mnt/sdb1/mydata");
|
||||
@@ -68,13 +68,13 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||
{
|
||||
Detail = new Dictionary<string, string>
|
||||
{
|
||||
{ "destination","shared/folder" },
|
||||
{ "destination", "shared/folder" },
|
||||
{ "uri", DownloadURL }
|
||||
},
|
||||
Transfer = new Dictionary<string, string>
|
||||
{
|
||||
{ "size_downloaded", "0"},
|
||||
{ "size_uploaded", "0"},
|
||||
{ "size_downloaded", "0" },
|
||||
{ "size_uploaded", "0" },
|
||||
{ "speed_download", "0" }
|
||||
}
|
||||
}
|
||||
@@ -92,13 +92,13 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||
{
|
||||
Detail = new Dictionary<string, string>
|
||||
{
|
||||
{ "destination","shared/folder" },
|
||||
{ "destination", "shared/folder" },
|
||||
{ "uri", DownloadURL }
|
||||
},
|
||||
Transfer = new Dictionary<string, string>
|
||||
{
|
||||
{ "size_downloaded", "1000"},
|
||||
{ "size_uploaded", "100"},
|
||||
{ "size_downloaded", "1000" },
|
||||
{ "size_uploaded", "100" },
|
||||
{ "speed_download", "0" }
|
||||
},
|
||||
}
|
||||
@@ -116,13 +116,13 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||
{
|
||||
Detail = new Dictionary<string, string>
|
||||
{
|
||||
{ "destination","shared/folder" },
|
||||
{ "destination", "shared/folder" },
|
||||
{ "uri", DownloadURL }
|
||||
},
|
||||
Transfer = new Dictionary<string, string>
|
||||
{
|
||||
{ "size_downloaded", "1000"},
|
||||
{ "size_uploaded", "100"},
|
||||
{ "size_downloaded", "1000" },
|
||||
{ "size_uploaded", "100" },
|
||||
{ "speed_download", "0" }
|
||||
}
|
||||
}
|
||||
@@ -140,13 +140,13 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||
{
|
||||
Detail = new Dictionary<string, string>
|
||||
{
|
||||
{ "destination","shared/folder" },
|
||||
{ "destination", "shared/folder" },
|
||||
{ "uri", DownloadURL }
|
||||
},
|
||||
Transfer = new Dictionary<string, string>
|
||||
{
|
||||
{ "size_downloaded", "100"},
|
||||
{ "size_uploaded", "10"},
|
||||
{ "size_downloaded", "100" },
|
||||
{ "size_uploaded", "10" },
|
||||
{ "speed_download", "50" }
|
||||
}
|
||||
}
|
||||
@@ -164,13 +164,13 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||
{
|
||||
Detail = new Dictionary<string, string>
|
||||
{
|
||||
{ "destination","shared/folder" },
|
||||
{ "destination", "shared/folder" },
|
||||
{ "uri", DownloadURL }
|
||||
},
|
||||
Transfer = new Dictionary<string, string>
|
||||
{
|
||||
{ "size_downloaded", "10"},
|
||||
{ "size_uploaded", "1"},
|
||||
{ "size_downloaded", "10" },
|
||||
{ "size_uploaded", "1" },
|
||||
{ "speed_download", "0" }
|
||||
}
|
||||
}
|
||||
@@ -188,13 +188,13 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||
{
|
||||
Detail = new Dictionary<string, string>
|
||||
{
|
||||
{ "destination","shared/folder" },
|
||||
{ "destination", "shared/folder" },
|
||||
{ "uri", DownloadURL }
|
||||
},
|
||||
Transfer = new Dictionary<string, string>
|
||||
{
|
||||
{ "size_downloaded", "1000"},
|
||||
{ "size_uploaded", "100"},
|
||||
{ "size_downloaded", "1000" },
|
||||
{ "size_uploaded", "100" },
|
||||
{ "speed_download", "0" }
|
||||
}
|
||||
}
|
||||
@@ -212,13 +212,13 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||
{
|
||||
Detail = new Dictionary<string, string>
|
||||
{
|
||||
{ "destination","shared/folder" },
|
||||
{ "destination", "shared/folder" },
|
||||
{ "uri", DownloadURL }
|
||||
},
|
||||
Transfer = new Dictionary<string, string>
|
||||
{
|
||||
{ "size_downloaded", "1000"},
|
||||
{ "size_uploaded", "100"},
|
||||
{ "size_downloaded", "1000" },
|
||||
{ "size_uploaded", "100" },
|
||||
{ "speed_download", "0" }
|
||||
}
|
||||
}
|
||||
@@ -236,13 +236,13 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||
{
|
||||
Detail = new Dictionary<string, string>
|
||||
{
|
||||
{ "destination","shared/folder" },
|
||||
{ "destination", "shared/folder" },
|
||||
{ "uri", DownloadURL }
|
||||
},
|
||||
Transfer = new Dictionary<string, string>
|
||||
{
|
||||
{ "size_downloaded", "1000"},
|
||||
{ "size_uploaded", "100"},
|
||||
{ "size_downloaded", "1000" },
|
||||
{ "size_uploaded", "100" },
|
||||
{ "speed_download", "0" }
|
||||
}
|
||||
}
|
||||
@@ -260,13 +260,13 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||
{
|
||||
Detail = new Dictionary<string, string>
|
||||
{
|
||||
{ "destination","shared/folder" },
|
||||
{ "destination", "shared/folder" },
|
||||
{ "uri", DownloadURL }
|
||||
},
|
||||
Transfer = new Dictionary<string, string>
|
||||
{
|
||||
{ "size_downloaded", "1000"},
|
||||
{ "size_uploaded", "100"},
|
||||
{ "size_downloaded", "1000" },
|
||||
{ "size_uploaded", "100" },
|
||||
{ "speed_download", "0" }
|
||||
}
|
||||
}
|
||||
@@ -649,7 +649,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||
|
||||
items.Should().HaveCount(1);
|
||||
var item = items.First();
|
||||
|
||||
|
||||
item.CanBeRemoved.Should().Be(canBeRemovedExpected);
|
||||
item.CanMoveFiles.Should().Be(canMoveFilesExpected);
|
||||
}
|
||||
|
||||
+13
-15
@@ -7,12 +7,12 @@ using NUnit.Framework;
|
||||
using NzbDrone.Common.Disk;
|
||||
using NzbDrone.Common.Http;
|
||||
using NzbDrone.Core.Download;
|
||||
using NzbDrone.Core.Download.Clients;
|
||||
using NzbDrone.Core.Download.Clients.DownloadStation;
|
||||
using NzbDrone.Core.Download.Clients.DownloadStation.Proxies;
|
||||
using NzbDrone.Core.Organizer;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
using NzbDrone.Test.Common;
|
||||
using NzbDrone.Core.Organizer;
|
||||
using NzbDrone.Core.Download.Clients;
|
||||
|
||||
namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||
{
|
||||
@@ -65,12 +65,12 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||
{
|
||||
Detail = new Dictionary<string, string>
|
||||
{
|
||||
{ "destination","shared/folder" },
|
||||
{ "destination", "shared/folder" },
|
||||
{ "uri", FileNameBuilder.CleanFileName(_remoteAlbum.Release.Title) + ".nzb" }
|
||||
},
|
||||
Transfer = new Dictionary<string, string>
|
||||
{
|
||||
{ "size_downloaded", "0"},
|
||||
{ "size_downloaded", "0" },
|
||||
{ "speed_download", "0" }
|
||||
}
|
||||
}
|
||||
@@ -88,12 +88,12 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||
{
|
||||
Detail = new Dictionary<string, string>
|
||||
{
|
||||
{ "destination","shared/folder" },
|
||||
{ "destination", "shared/folder" },
|
||||
{ "uri", FileNameBuilder.CleanFileName(_remoteAlbum.Release.Title) + ".nzb" }
|
||||
},
|
||||
Transfer = new Dictionary<string, string>
|
||||
{
|
||||
{ "size_downloaded", "1000"},
|
||||
{ "size_downloaded", "1000" },
|
||||
{ "speed_download", "0" }
|
||||
},
|
||||
}
|
||||
@@ -111,12 +111,12 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||
{
|
||||
Detail = new Dictionary<string, string>
|
||||
{
|
||||
{ "destination","shared/folder" },
|
||||
{ "destination", "shared/folder" },
|
||||
{ "uri", FileNameBuilder.CleanFileName(_remoteAlbum.Release.Title) + ".nzb" }
|
||||
},
|
||||
Transfer = new Dictionary<string, string>
|
||||
{
|
||||
{ "size_downloaded", "1000"},
|
||||
{ "size_downloaded", "1000" },
|
||||
{ "speed_download", "0" }
|
||||
}
|
||||
}
|
||||
@@ -134,12 +134,12 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||
{
|
||||
Detail = new Dictionary<string, string>
|
||||
{
|
||||
{ "destination","shared/folder" },
|
||||
{ "destination", "shared/folder" },
|
||||
{ "uri", FileNameBuilder.CleanFileName(_remoteAlbum.Release.Title) + ".nzb" }
|
||||
},
|
||||
Transfer = new Dictionary<string, string>
|
||||
{
|
||||
{ "size_downloaded", "100"},
|
||||
{ "size_downloaded", "100" },
|
||||
{ "speed_download", "50" }
|
||||
}
|
||||
}
|
||||
@@ -157,12 +157,12 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||
{
|
||||
Detail = new Dictionary<string, string>
|
||||
{
|
||||
{ "destination","shared/folder" },
|
||||
{ "destination", "shared/folder" },
|
||||
{ "uri", FileNameBuilder.CleanFileName(_remoteAlbum.Release.Title) + ".nzb" }
|
||||
},
|
||||
Transfer = new Dictionary<string, string>
|
||||
{
|
||||
{ "size_downloaded", "10"},
|
||||
{ "size_downloaded", "10" },
|
||||
{ "speed_download", "0" }
|
||||
}
|
||||
}
|
||||
@@ -200,7 +200,6 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||
.Returns<OsPath, DownloadStationSettings, string>((path, setttings, serial) => _physicalPath);
|
||||
}
|
||||
|
||||
|
||||
protected void GivenSerialNumber()
|
||||
{
|
||||
Mocker.GetMock<ISerialNumberProvider>()
|
||||
@@ -244,7 +243,6 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||
.Setup(s => s.Get(It.IsAny<HttpRequest>()))
|
||||
.Returns<HttpRequest>(r => new HttpResponse(r, new HttpHeader(), new byte[1000]));
|
||||
*/
|
||||
|
||||
Mocker.GetMock<IDownloadStationTaskProxy>()
|
||||
.Setup(s => s.AddTaskFromData(It.IsAny<byte[]>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<DownloadStationSettings>()))
|
||||
.Callback(PrepareClientToReturnQueuedItem);
|
||||
@@ -385,7 +383,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
|
||||
Mocker.GetMock<IDownloadStationTaskProxy>()
|
||||
.Verify(v => v.AddTaskFromUrl(It.IsAny<string>(), null, _settings), Times.Never());
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void GetStatus_should_map_outputpath_when_using_default()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user