From 288359627eeb5e5351dffbfc06c183e27308928f Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Sun, 16 Oct 2011 20:51:15 -0700 Subject: [PATCH] WebException now marks indexer tests as Inconclusive. --- NzbDrone.Core.Test/IndexerTests.cs | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/NzbDrone.Core.Test/IndexerTests.cs b/NzbDrone.Core.Test/IndexerTests.cs index 33367f366..40ab07a1a 100644 --- a/NzbDrone.Core.Test/IndexerTests.cs +++ b/NzbDrone.Core.Test/IndexerTests.cs @@ -66,7 +66,7 @@ namespace NzbDrone.Core.Test .Setup(h => h.DownloadStream(It.IsAny(), It.IsAny())) .Returns(File.OpenRead(".\\Files\\Rss\\newbin_none_english.xml")); - + var newzbin = mocker.Resolve(); var parseResults = newzbin.FetchRss(); @@ -204,12 +204,12 @@ namespace NzbDrone.Core.Test var result = mocker.Resolve().FetchEpisode(title, season, episode); + ExceptionVerification.MarkInconclusive(typeof(WebException)); + result.Should().NotBeEmpty(); result.Should().OnlyContain(r => r.CleanTitle == Parser.NormalizeTitle(title)); result.Should().OnlyContain(r => r.SeasonNumber == season); result.Should().OnlyContain(r => r.EpisodeNumbers.Contains(episode)); - - ExceptionVerification.MarkInconclusive(typeof(WebException)); } [TestCase("simpsons", 21, 23)] @@ -231,12 +231,12 @@ namespace NzbDrone.Core.Test var result = mocker.Resolve().FetchEpisode(title, season, episode); + ExceptionVerification.MarkInconclusive(typeof(WebException)); + result.Should().NotBeEmpty(); result.Should().OnlyContain(r => r.CleanTitle == Parser.NormalizeTitle(title)); result.Should().OnlyContain(r => r.SeasonNumber == season); result.Should().OnlyContain(r => r.EpisodeNumbers.Contains(episode)); - - ExceptionVerification.MarkInconclusive(typeof(WebException)); } [Test] @@ -256,12 +256,12 @@ namespace NzbDrone.Core.Test var result = mocker.Resolve().FetchEpisode("Simpsons", 21, 23); + ExceptionVerification.MarkInconclusive(typeof(WebException)); + result.Should().NotBeEmpty(); result.Should().OnlyContain(r => r.CleanTitle == "simpsons"); result.Should().OnlyContain(r => r.SeasonNumber == 21); result.Should().OnlyContain(r => r.EpisodeNumbers.Contains(23)); - - ExceptionVerification.MarkInconclusive(typeof(WebException)); } [Test] @@ -281,13 +281,12 @@ namespace NzbDrone.Core.Test var result = mocker.Resolve().FetchEpisode("Blue Bloods", 1, 19); + ExceptionVerification.MarkInconclusive(typeof(WebException)); + result.Should().NotBeEmpty(); result.Should().OnlyContain(r => r.CleanTitle == "bluebloods"); result.Should().OnlyContain(r => r.SeasonNumber == 1); result.Should().OnlyContain(r => r.EpisodeNumbers.Contains(19)); - - ExceptionVerification.MarkInconclusive(typeof(WebException)); - } [Test] @@ -307,12 +306,12 @@ namespace NzbDrone.Core.Test var result = mocker.Resolve().FetchEpisode("Blue Bloods", 1, 19); + ExceptionVerification.MarkInconclusive(typeof(WebException)); + result.Should().NotBeEmpty(); result.Should().OnlyContain(r => r.CleanTitle == "bluebloods"); result.Should().OnlyContain(r => r.SeasonNumber == 1); result.Should().OnlyContain(r => r.EpisodeNumbers.Contains(19)); - - ExceptionVerification.MarkInconclusive(typeof(WebException)); }