New: Added NzbClub.com as an indexer, enabled by default

This commit is contained in:
Mark McDowall 2012-04-14 16:50:08 -07:00
commit a947cd2743
6 changed files with 420 additions and 3 deletions

View file

@ -34,6 +34,7 @@ namespace NzbDrone.Core.Test
[TestCase("wombles.xml")]
[TestCase("filesharingtalk.xml")]
[TestCase("nzbindex.xml")]
[TestCase("nzbclub.xml")]
public void parse_feed_xml(string fileName)
{
Mocker.GetMock<HttpProvider>()
@ -258,8 +259,6 @@ namespace NzbDrone.Core.Test
result.Should().NotBeEmpty();
}
[Test]
public void nzbmatrix_multi_word_search_returns_valid_results()
{
@ -274,7 +273,6 @@ namespace NzbDrone.Core.Test
result.Should().NotBeEmpty();
}
[TestCase("hawaii five-0 (2010)", "hawaii+five+0+2010")]
[TestCase("this& that", "this+that")]
[TestCase("this& that", "this+that")]
@ -400,6 +398,22 @@ namespace NzbDrone.Core.Test
parseResults[0].Size.Should().Be(587328389);
}
[Test]
public void size_nzbclub()
{
WithConfiguredIndexers();
Mocker.GetMock<HttpProvider>()
.Setup(h => h.DownloadStream(It.IsAny<String>(), It.IsAny<NetworkCredential>()))
.Returns(File.OpenRead(".\\Files\\Rss\\SizeParsing\\nzbclub.xml"));
//Act
var parseResults = Mocker.Resolve<NzbClub>().FetchRss();
parseResults.Should().HaveCount(1);
parseResults[0].Size.Should().Be(2652142305);
}
[Test]
public void Server_Unavailable_503_should_not_log_exception()
{
@ -500,5 +514,21 @@ namespace NzbDrone.Core.Test
parseResults.Should().HaveCount(1);
parseResults[0].CleanTitle.Should().Be("britainsgotmoretalent");
}
[Test]
public void title_preparse_nzbclub()
{
WithConfiguredIndexers();
Mocker.GetMock<HttpProvider>()
.Setup(h => h.DownloadStream(It.IsAny<String>(), It.IsAny<NetworkCredential>()))
.Returns(File.OpenRead(".\\Files\\Rss\\SizeParsing\\nzbclub.xml"));
//Act
var parseResults = Mocker.Resolve<NzbIndex>().FetchRss();
parseResults.Should().HaveCount(1);
parseResults[0].CleanTitle.Should().Be("britainsgottalent");
}
}
}