|
|
@ -19,6 +19,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
|
|
|
|
private NzbgetQueueItem _queued;
|
|
|
|
private NzbgetQueueItem _queued;
|
|
|
|
private NzbgetHistoryItem _failed;
|
|
|
|
private NzbgetHistoryItem _failed;
|
|
|
|
private NzbgetHistoryItem _completed;
|
|
|
|
private NzbgetHistoryItem _completed;
|
|
|
|
|
|
|
|
private Dictionary<string, string> _configItems;
|
|
|
|
|
|
|
|
|
|
|
|
[SetUp]
|
|
|
|
[SetUp]
|
|
|
|
public void Setup()
|
|
|
|
public void Setup()
|
|
|
@ -80,13 +81,18 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
|
|
|
|
DownloadRate = 7000000
|
|
|
|
DownloadRate = 7000000
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
var configItems = new Dictionary<string, string>();
|
|
|
|
|
|
|
|
configItems.Add("Category1.Name", "tv");
|
|
|
|
Mocker.GetMock<INzbgetProxy>()
|
|
|
|
configItems.Add("Category1.DestDir", @"/remote/mount/tv");
|
|
|
|
.Setup(v => v.GetVersion(It.IsAny<NzbgetSettings>()))
|
|
|
|
|
|
|
|
.Returns("14.0");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_configItems = new Dictionary<string, string>();
|
|
|
|
|
|
|
|
_configItems.Add("Category1.Name", "tv");
|
|
|
|
|
|
|
|
_configItems.Add("Category1.DestDir", @"/remote/mount/tv");
|
|
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<INzbgetProxy>()
|
|
|
|
Mocker.GetMock<INzbgetProxy>()
|
|
|
|
.Setup(v => v.GetConfig(It.IsAny<NzbgetSettings>()))
|
|
|
|
.Setup(v => v.GetConfig(It.IsAny<NzbgetSettings>()))
|
|
|
|
.Returns(configItems);
|
|
|
|
.Returns(_configItems);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected void GivenFailedDownload()
|
|
|
|
protected void GivenFailedDownload()
|
|
|
@ -421,9 +427,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.NzbgetTests
|
|
|
|
[TestCase("5000000", false)]
|
|
|
|
[TestCase("5000000", false)]
|
|
|
|
public void should_test_keephistory(string keephistory, bool expected)
|
|
|
|
public void should_test_keephistory(string keephistory, bool expected)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Mocker.GetMock<INzbgetProxy>()
|
|
|
|
_configItems["KeepHistory"] = keephistory;
|
|
|
|
.Setup(v => v.GetConfig(It.IsAny<NzbgetSettings>()))
|
|
|
|
|
|
|
|
.Returns(new Dictionary<string, string> { { "KeepHistory", keephistory } });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var error = Subject.Test();
|
|
|
|
var error = Subject.Test();
|
|
|
|
|
|
|
|
|
|
|
|