Throw exception with error message return by diskstation (#1672)

This commit is contained in:
Marcelo Castagna
2017-02-12 16:20:16 -03:00
committed by Taloth
parent d7aa23388e
commit cf306f4aba
6 changed files with 101 additions and 132 deletions
@@ -331,13 +331,11 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
.Returns<HttpRequest>(r => new HttpResponse(r, new HttpHeader(), new byte[1000]));
Mocker.GetMock<IDownloadStationProxy>()
.Setup(s => s.AddTorrentFromUrl(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<DownloadStationSettings>()))
.Returns(true)
.Setup(s => s.AddTorrentFromUrl(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<DownloadStationSettings>()))
.Callback(PrepareClientToReturnQueuedItem);
Mocker.GetMock<IDownloadStationProxy>()
.Setup(s => s.AddTorrentFromData(It.IsAny<byte[]>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<DownloadStationSettings>()))
.Returns(true)
.Setup(s => s.AddTorrentFromData(It.IsAny<byte[]>(), It.IsAny<string>(), It.IsAny<string>(), It.IsAny<DownloadStationSettings>()))
.Callback(PrepareClientToReturnQueuedItem);
}
@@ -467,7 +465,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
}
[Test]
public void GetItems_should_set_outputhPath_to_base_folder_when_single_file_non_finished_torrent()
public void GetItems_should_set_outputPath_to_base_folder_when_single_file_non_finished_torrent()
{
GivenSerialNumber();
GivenSharedFolder();
@@ -481,7 +479,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
}
[Test]
public void GetItems_should_set_outputhPath_to_torrent_folder_when_multiple_files_non_finished_torrent()
public void GetItems_should_set_outputPath_to_torrent_folder_when_multiple_files_non_finished_torrent()
{
GivenSerialNumber();
GivenSharedFolder();
@@ -495,7 +493,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
}
[Test]
public void GetItems_should_set_outputhPath_to_base_folder_when_single_file_finished_torrent()
public void GetItems_should_set_outputPath_to_base_folder_when_single_file_finished_torrent()
{
GivenSerialNumber();
GivenSharedFolder();
@@ -509,7 +507,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DownloadStationTests
}
[Test]
public void GetItems_should_set_outputhPath_to_torrent_folder_when_multiple_files_finished_torrent()
public void GetItems_should_set_outputPath_to_torrent_folder_when_multiple_files_finished_torrent()
{
GivenSerialNumber();
GivenSharedFolder();