You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.0 KiB
38 lines
1.0 KiB
using System.Collections.Generic;
|
|
using FluentAssertions;
|
|
using NUnit.Framework;
|
|
using NzbDrone.Core.IndexerSearch;
|
|
using NzbDrone.Core.Tv;
|
|
using NzbDrone.Test.Common;
|
|
|
|
namespace NzbDrone.Core.Test.IndexerSearchTests.DailyEpisodeSearchTests
|
|
{
|
|
[TestFixture]
|
|
public class IndexerDailyEpisodeSearch_EpisodeMatch : IndexerSearchTestBase<DailyEpisodeSearch>
|
|
{
|
|
[Test]
|
|
public void should_fetch_results_from_indexers()
|
|
{
|
|
WithValidIndexers();
|
|
|
|
|
|
Subject.PerformSearch(_series, new List<Episode> { _episode }, notification)
|
|
.Should()
|
|
.HaveCount(20);
|
|
}
|
|
|
|
[Test]
|
|
public void should_log_error_when_fetching_from_indexer_fails()
|
|
{
|
|
WithBrokenIndexers();
|
|
|
|
Mocker.Resolve<DailyEpisodeSearch>()
|
|
.PerformSearch(_series, new List<Episode> { _episode }, notification)
|
|
.Should()
|
|
.HaveCount(0);
|
|
|
|
ExceptionVerification.ExpectedErrors(2);
|
|
}
|
|
}
|
|
}
|