|
|
@ -4,6 +4,7 @@ using NzbDrone.Core.Indexers;
|
|
|
|
using NzbDrone.Core.Indexers.Newznab;
|
|
|
|
using NzbDrone.Core.Indexers.Newznab;
|
|
|
|
using NzbDrone.Core.Indexers.NzbClub;
|
|
|
|
using NzbDrone.Core.Indexers.NzbClub;
|
|
|
|
using NzbDrone.Core.Indexers.Nzbx;
|
|
|
|
using NzbDrone.Core.Indexers.Nzbx;
|
|
|
|
|
|
|
|
using NzbDrone.Core.Indexers.Wombles;
|
|
|
|
using NzbDrone.Core.Parser.Model;
|
|
|
|
using NzbDrone.Core.Parser.Model;
|
|
|
|
using NzbDrone.Core.Test.Framework;
|
|
|
|
using NzbDrone.Core.Test.Framework;
|
|
|
|
using NUnit.Framework;
|
|
|
|
using NUnit.Framework;
|
|
|
@ -43,6 +44,17 @@ namespace NzbDrone.Core.Test.IndexerTests.IntegrationTests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
|
|
|
public void wombles_rss()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var indexer = new Wombles();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var result = Subject.FetchRss(indexer);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ValidateResult(result, skipSize: true, skipInfo: true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
[Test]
|
|
|
|
[Explicit("needs newznab api key")]
|
|
|
|
[Explicit("needs newznab api key")]
|
|
|
|
public void nzbsorg_rss()
|
|
|
|
public void nzbsorg_rss()
|
|
|
@ -58,26 +70,27 @@ namespace NzbDrone.Core.Test.IndexerTests.IntegrationTests
|
|
|
|
|
|
|
|
|
|
|
|
var result = Subject.FetchRss(indexer);
|
|
|
|
var result = Subject.FetchRss(indexer);
|
|
|
|
|
|
|
|
|
|
|
|
result.Should().NotBeEmpty();
|
|
|
|
ValidateResult(result);
|
|
|
|
result.Should().OnlyContain(c => !string.IsNullOrWhiteSpace(c.Title));
|
|
|
|
|
|
|
|
result.Should().OnlyContain(c => !string.IsNullOrWhiteSpace(c.NzbUrl));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TODO: uncomment these after moving to restsharp for rss
|
|
|
|
|
|
|
|
//result.Should().OnlyContain(c => !string.IsNullOrWhiteSpace(c.NzbInfoUrl));
|
|
|
|
|
|
|
|
//result.Should().OnlyContain(c => c.Size > 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void ValidateResult(IList<ReportInfo> reports)
|
|
|
|
private void ValidateResult(IList<ReportInfo> reports, bool skipSize = false, bool skipInfo = false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
reports.Should().NotBeEmpty();
|
|
|
|
reports.Should().NotBeEmpty();
|
|
|
|
reports.Should().OnlyContain(c => !string.IsNullOrWhiteSpace(c.Title));
|
|
|
|
reports.Should().OnlyContain(c => !string.IsNullOrWhiteSpace(c.Title));
|
|
|
|
reports.Should().OnlyContain(c => !string.IsNullOrWhiteSpace(c.NzbInfoUrl));
|
|
|
|
|
|
|
|
reports.Should().OnlyContain(c => !string.IsNullOrWhiteSpace(c.NzbUrl));
|
|
|
|
reports.Should().OnlyContain(c => !string.IsNullOrWhiteSpace(c.NzbUrl));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!skipInfo)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
reports.Should().OnlyContain(c => !string.IsNullOrWhiteSpace(c.NzbInfoUrl));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!skipSize)
|
|
|
|
|
|
|
|
{
|
|
|
|
reports.Should().OnlyContain(c => c.Size > 0);
|
|
|
|
reports.Should().OnlyContain(c => c.Size > 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|