Added test for season search

This commit is contained in:
Mark McDowall 2012-12-31 12:25:15 -08:00
parent c738a32162
commit edf06dda3e
1 changed files with 11 additions and 0 deletions

View File

@ -122,5 +122,16 @@ namespace NzbDrone.Core.Test.JobTests
ExceptionVerification.ExpectedWarns(1);
}
[Test]
public void should_search_for_individual_episodes_when_no_partial_results_are_returned()
{
Mocker.GetMock<SearchProvider>()
.Setup(c => c.PartialSeasonSearch(notification, 1, 1)).Returns(new List<int>());
Mocker.Resolve<SeasonSearchJob>().Start(notification, new { SeriesId = 1, SeasonNumber = 1 });
Mocker.GetMock<EpisodeSearchJob>().Verify(v => v.Start(notification, It.Is<object>(o => o.GetPropertyValue<Int32>("EpisodeId") > 0)), Times.Exactly(_episodes.Count));
}
}
}