Fixed broken unit tests from parsing logging changes.

pull/4/head
Mark McDowall 13 years ago
parent bc3e7239c2
commit b751bbc4ce

@ -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<HttpProvider>()
.Setup(h => h.DownloadStream(It.IsAny<String>(), It.IsAny<NetworkCredential>()))
@ -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]

@ -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);
}
}
}

Loading…
Cancel
Save