mirror of
https://github.com/Radarr/Radarr
synced 2024-12-27 02:09:59 +00:00
Fixed broken tests.
This commit is contained in:
parent
43e5cb7b31
commit
8afd7d2b47
3 changed files with 6 additions and 8 deletions
|
@ -67,7 +67,7 @@ public void SeasonSearch_season_success()
|
||||||
.Setup(c => c.GetSeries(1)).Returns(series);
|
.Setup(c => c.GetSeries(1)).Returns(series);
|
||||||
|
|
||||||
mocker.GetMock<EpisodeProvider>()
|
mocker.GetMock<EpisodeProvider>()
|
||||||
.Setup(c => c.GetEpisodesBySeason(1, 1)).Returns(episodes);
|
.Setup(c => c.GetEpisodeNumbersBySeason(1, 1)).Returns(episodes.Select(e => e.EpisodeNumber).ToList());
|
||||||
|
|
||||||
mocker.GetMock<SceneMappingProvider>()
|
mocker.GetMock<SceneMappingProvider>()
|
||||||
.Setup(s => s.GetSceneName(1)).Returns(String.Empty);
|
.Setup(s => s.GetSceneName(1)).Returns(String.Empty);
|
||||||
|
@ -128,17 +128,11 @@ public void SeasonSearch_season_failure()
|
||||||
.Setup(c => c.GetSeries(1)).Returns(series);
|
.Setup(c => c.GetSeries(1)).Returns(series);
|
||||||
|
|
||||||
mocker.GetMock<EpisodeProvider>()
|
mocker.GetMock<EpisodeProvider>()
|
||||||
.Setup(c => c.GetEpisodesBySeason(1, 1)).Returns(episodes);
|
.Setup(c => c.GetEpisodeNumbersBySeason(1, 1)).Returns(episodes.Select(e => e.EpisodeNumber).ToList());
|
||||||
|
|
||||||
mocker.GetMock<SceneMappingProvider>()
|
mocker.GetMock<SceneMappingProvider>()
|
||||||
.Setup(s => s.GetSceneName(1)).Returns(String.Empty);
|
.Setup(s => s.GetSceneName(1)).Returns(String.Empty);
|
||||||
|
|
||||||
//mocker.GetMock<InventoryProvider>()
|
|
||||||
// .Setup(s => s.IsQualityNeeded(It.IsAny<EpisodeParseResult>())).Returns(true);
|
|
||||||
|
|
||||||
//mocker.GetMock<DownloadProvider>()
|
|
||||||
// .Setup(s => s.DownloadReport(It.IsAny<EpisodeParseResult>())).Returns(true);
|
|
||||||
|
|
||||||
//Act
|
//Act
|
||||||
mocker.Resolve<SearchProvider>().SeasonSearch(notification, 1, 1);
|
mocker.Resolve<SearchProvider>().SeasonSearch(notification, 1, 1);
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,9 @@ public void SeriesSearch_success()
|
||||||
mocker.GetMock<EpisodeProvider>()
|
mocker.GetMock<EpisodeProvider>()
|
||||||
.Setup(c => c.GetSeasons(1)).Returns(seasons);
|
.Setup(c => c.GetSeasons(1)).Returns(seasons);
|
||||||
|
|
||||||
|
mocker.GetMock<EpisodeProvider>()
|
||||||
|
.Setup(c => c.IsIgnored(It.IsAny<int>(), It.IsAny<int>())).Returns(false);
|
||||||
|
|
||||||
mocker.GetMock<SeasonSearchJob>()
|
mocker.GetMock<SeasonSearchJob>()
|
||||||
.Setup(c => c.Start(notification, 1, It.IsAny<int>())).Verifiable();
|
.Setup(c => c.Start(notification, 1, It.IsAny<int>())).Verifiable();
|
||||||
|
|
||||||
|
|
|
@ -108,6 +108,7 @@ private static void BindJobs()
|
||||||
_kernel.Bind<IJob>().To<RenameSeasonJob>().InSingletonScope();
|
_kernel.Bind<IJob>().To<RenameSeasonJob>().InSingletonScope();
|
||||||
_kernel.Bind<IJob>().To<SeriesSearchJob>().InSingletonScope();
|
_kernel.Bind<IJob>().To<SeriesSearchJob>().InSingletonScope();
|
||||||
_kernel.Bind<IJob>().To<RenameSeriesJob>().InSingletonScope();
|
_kernel.Bind<IJob>().To<RenameSeriesJob>().InSingletonScope();
|
||||||
|
_kernel.Bind<IJob>().To<BacklogSearchJob>().InSingletonScope();
|
||||||
|
|
||||||
_kernel.Get<JobProvider>().Initialize();
|
_kernel.Get<JobProvider>().Initialize();
|
||||||
_kernel.Get<WebTimer>().StartTimer(30);
|
_kernel.Get<WebTimer>().StartTimer(30);
|
||||||
|
|
Loading…
Reference in a new issue