From 54d296c2a829564a574bce70c290f9e7936322ba Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Sun, 23 Nov 2014 21:40:18 +0100 Subject: [PATCH] fixed broken tests in torrent client. --- .../DownloadClientTests/DelugeTests/DelugeFixture.cs | 2 +- .../DownloadClientTests/DownloadClientFixtureBase.cs | 7 +++++++ .../TransmissionTests/TransmissionFixture.cs | 2 +- .../DownloadClientTests/UTorrentTests/UTorrentFixture.cs | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core.Test/Download/DownloadClientTests/DelugeTests/DelugeFixture.cs b/src/NzbDrone.Core.Test/Download/DownloadClientTests/DelugeTests/DelugeFixture.cs index 8e3f7e784..3376ef343 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadClientTests/DelugeTests/DelugeFixture.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadClientTests/DelugeTests/DelugeFixture.cs @@ -186,7 +186,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.DelugeTests { PrepareClientToReturnFailedItem(); var item = Subject.GetItems().Single(); - VerifyFailed(item); + VerifyWarning(item); } [Test] diff --git a/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadClientFixtureBase.cs b/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadClientFixtureBase.cs index 0a7272e1b..3d52a42ca 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadClientFixtureBase.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadClientTests/DownloadClientFixtureBase.cs @@ -108,6 +108,13 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests downloadClientItem.Status.Should().Be(DownloadItemStatus.Completed); } + protected void VerifyWarning(DownloadClientItem downloadClientItem) + { + VerifyIdentifiable(downloadClientItem); + + downloadClientItem.Status.Should().Be(DownloadItemStatus.Warning); + } + protected void VerifyFailed(DownloadClientItem downloadClientItem) { VerifyIdentifiable(downloadClientItem); diff --git a/src/NzbDrone.Core.Test/Download/DownloadClientTests/TransmissionTests/TransmissionFixture.cs b/src/NzbDrone.Core.Test/Download/DownloadClientTests/TransmissionTests/TransmissionFixture.cs index 0556528cf..93b730c12 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadClientTests/TransmissionTests/TransmissionFixture.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadClientTests/TransmissionTests/TransmissionFixture.cs @@ -198,7 +198,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.TransmissionTests { PrepareClientToReturnFailedItem(); var item = Subject.GetItems().Single(); - VerifyFailed(item); + VerifyWarning(item); } [Test] diff --git a/src/NzbDrone.Core.Test/Download/DownloadClientTests/UTorrentTests/UTorrentFixture.cs b/src/NzbDrone.Core.Test/Download/DownloadClientTests/UTorrentTests/UTorrentFixture.cs index 4d2635c23..85d52ea03 100644 --- a/src/NzbDrone.Core.Test/Download/DownloadClientTests/UTorrentTests/UTorrentFixture.cs +++ b/src/NzbDrone.Core.Test/Download/DownloadClientTests/UTorrentTests/UTorrentFixture.cs @@ -192,7 +192,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.UTorrentTests { PrepareClientToReturnFailedItem(); var item = Subject.GetItems().Single(); - VerifyFailed(item); + VerifyWarning(item); } [Test]