mirror of https://github.com/lidarr/Lidarr
Fixed broken unit tests from parsing logging changes.
This commit is contained in:
parent
bc3e7239c2
commit
b751bbc4ce
|
@ -25,11 +25,11 @@ namespace NzbDrone.Core.Test
|
||||||
public class IndexerTests : CoreTest
|
public class IndexerTests : CoreTest
|
||||||
{
|
{
|
||||||
|
|
||||||
[TestCase("nzbsorg.xml", 1)]
|
[TestCase("nzbsorg.xml")]
|
||||||
[TestCase("nzbsrus.xml", 8)]
|
[TestCase("nzbsrus.xml")]
|
||||||
[TestCase("newzbin.xml", 1)]
|
[TestCase("newzbin.xml")]
|
||||||
[TestCase("nzbmatrix.xml", 2)]
|
[TestCase("nzbmatrix.xml")]
|
||||||
public void parse_feed_xml(string fileName, int warns)
|
public void parse_feed_xml(string fileName)
|
||||||
{
|
{
|
||||||
Mocker.GetMock<HttpProvider>()
|
Mocker.GetMock<HttpProvider>()
|
||||||
.Setup(h => h.DownloadStream(It.IsAny<String>(), It.IsAny<NetworkCredential>()))
|
.Setup(h => h.DownloadStream(It.IsAny<String>(), It.IsAny<NetworkCredential>()))
|
||||||
|
@ -53,8 +53,6 @@ namespace NzbDrone.Core.Test
|
||||||
parseResults.Should().NotBeEmpty();
|
parseResults.Should().NotBeEmpty();
|
||||||
parseResults.Should().OnlyContain(s => s.Indexer == mockIndexer.Name);
|
parseResults.Should().OnlyContain(s => s.Indexer == mockIndexer.Name);
|
||||||
parseResults.Should().OnlyContain(s => !String.IsNullOrEmpty(s.OriginalString));
|
parseResults.Should().OnlyContain(s => !String.IsNullOrEmpty(s.OriginalString));
|
||||||
|
|
||||||
ExceptionVerification.ExpectedWarns(warns);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void WithConfiguredIndexers()
|
private void WithConfiguredIndexers()
|
||||||
|
@ -177,7 +175,6 @@ namespace NzbDrone.Core.Test
|
||||||
|
|
||||||
Assert.IsNotNull(result);
|
Assert.IsNotNull(result);
|
||||||
Assert.AreEqual(LanguageType.Finnish, result.Language);
|
Assert.AreEqual(LanguageType.Finnish, result.Language);
|
||||||
ExceptionVerification.ExpectedWarns(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[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));
|
var title = string.Format("{0:yyyy.MM.dd} - Denis Leary - HD TV.mkv", DateTime.Now.AddDays(2));
|
||||||
|
|
||||||
Parser.ParseTitle(title).Should().BeNull();
|
Parser.ParseTitle(title).Should().BeNull();
|
||||||
|
|
||||||
ExceptionVerification.ExpectedWarns(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -401,7 +399,6 @@ namespace NzbDrone.Core.Test
|
||||||
var result = Parser.ParseTitle(postTitle);
|
var result = Parser.ParseTitle(postTitle);
|
||||||
|
|
||||||
result.Should().BeNull();
|
result.Should().BeNull();
|
||||||
ExceptionVerification.ExpectedWarns(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestCase("Lie.to.Me.S03.SUBPACK.DVDRip.XviD-REWARD")]
|
[TestCase("Lie.to.Me.S03.SUBPACK.DVDRip.XviD-REWARD")]
|
||||||
|
@ -412,8 +409,6 @@ namespace NzbDrone.Core.Test
|
||||||
var result = Parser.ParseTitle(postTitle);
|
var result = Parser.ParseTitle(postTitle);
|
||||||
|
|
||||||
result.Should().BeNull();
|
result.Should().BeNull();
|
||||||
|
|
||||||
ExceptionVerification.ExpectedWarns(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestCase("Fussball Bundesliga 10e2011e30 Spieltag FC Bayern Muenchen vs Bayer 04 Leverkusen German WS dTV XviD WoGS")]
|
[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.IgnoreWarns();
|
||||||
ExceptionVerification.ExpectedErrors(1);
|
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…
Reference in New Issue