From b751bbc4cea79d876c56b94ada7c6fb5ca0ceb24 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 10 Feb 2012 21:35:14 -0800 Subject: [PATCH] Fixed broken unit tests from parsing logging changes. --- NzbDrone.Core.Test/IndexerTests.cs | 13 +++++-------- NzbDrone.Core.Test/ParserTest.cs | 12 ------------ 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/NzbDrone.Core.Test/IndexerTests.cs b/NzbDrone.Core.Test/IndexerTests.cs index 131dc6a07..045eced0e 100644 --- a/NzbDrone.Core.Test/IndexerTests.cs +++ b/NzbDrone.Core.Test/IndexerTests.cs @@ -25,11 +25,11 @@ namespace NzbDrone.Core.Test public class IndexerTests : CoreTest { - [TestCase("nzbsorg.xml", 1)] - [TestCase("nzbsrus.xml", 8)] - [TestCase("newzbin.xml", 1)] - [TestCase("nzbmatrix.xml", 2)] - public void parse_feed_xml(string fileName, int warns) + [TestCase("nzbsorg.xml")] + [TestCase("nzbsrus.xml")] + [TestCase("newzbin.xml")] + [TestCase("nzbmatrix.xml")] + public void parse_feed_xml(string fileName) { Mocker.GetMock() .Setup(h => h.DownloadStream(It.IsAny(), It.IsAny())) @@ -53,8 +53,6 @@ namespace NzbDrone.Core.Test parseResults.Should().NotBeEmpty(); parseResults.Should().OnlyContain(s => s.Indexer == mockIndexer.Name); parseResults.Should().OnlyContain(s => !String.IsNullOrEmpty(s.OriginalString)); - - ExceptionVerification.ExpectedWarns(warns); } private void WithConfiguredIndexers() @@ -177,7 +175,6 @@ namespace NzbDrone.Core.Test Assert.IsNotNull(result); Assert.AreEqual(LanguageType.Finnish, result.Language); - ExceptionVerification.ExpectedWarns(1); } [Test] diff --git a/NzbDrone.Core.Test/ParserTest.cs b/NzbDrone.Core.Test/ParserTest.cs index a261d740b..0aa41a4f9 100644 --- a/NzbDrone.Core.Test/ParserTest.cs +++ b/NzbDrone.Core.Test/ParserTest.cs @@ -221,8 +221,6 @@ namespace NzbDrone.Core.Test var title = string.Format("{0:yyyy.MM.dd} - Denis Leary - HD TV.mkv", DateTime.Now.AddDays(2)); Parser.ParseTitle(title).Should().BeNull(); - - ExceptionVerification.ExpectedWarns(1); } @@ -401,7 +399,6 @@ namespace NzbDrone.Core.Test var result = Parser.ParseTitle(postTitle); result.Should().BeNull(); - ExceptionVerification.ExpectedWarns(1); } [TestCase("Lie.to.Me.S03.SUBPACK.DVDRip.XviD-REWARD")] @@ -412,8 +409,6 @@ namespace NzbDrone.Core.Test var result = Parser.ParseTitle(postTitle); result.Should().BeNull(); - - ExceptionVerification.ExpectedWarns(1); } [TestCase("Fussball Bundesliga 10e2011e30 Spieltag FC Bayern Muenchen vs Bayer 04 Leverkusen German WS dTV XviD WoGS")] @@ -423,12 +418,5 @@ namespace NzbDrone.Core.Test ExceptionVerification.IgnoreWarns(); ExceptionVerification.ExpectedErrors(1); } - - [TestCase(@"C:\BuildAgent\work\b5a20f8391187721\NzbDrone.Core.Test\bin\Release\WEEDS.avi")] - public void parseTitle_should_log_warning_when_unable_to_parse(string title) - { - Parser.ParseTitle(title); - ExceptionVerification.ExpectedWarns(1); - } } }