1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-27 18:17:13 +00:00

Fixed broken tests after adding new job.

This commit is contained in:
Mark McDowall 2012-01-15 20:25:09 -08:00
parent 218059e08d
commit 488be41fb1
2 changed files with 12 additions and 0 deletions

View file

@ -37,6 +37,8 @@ public void series_specific_scan_should_scan_series()
.Setup(p => p.Scan(series))
.Returns(new List<EpisodeFile>());
Mocker.GetMock<AutoIgnoreJob>()
.Setup(s => s.Start(It.IsAny<ProgressNotification>(), 0, 0));
//Act
Mocker.Resolve<DiskScanJob>().Start(new ProgressNotification("Test"), series.SeriesId, 0);
@ -69,6 +71,9 @@ public void job_with_no_target_should_scan_all_series()
.Setup(s => s.Scan(series[1]))
.Returns(new List<EpisodeFile>());
Mocker.GetMock<AutoIgnoreJob>()
.Setup(s => s.Start(It.IsAny<ProgressNotification>(), 0, 0));
Mocker.Resolve<DiskScanJob>().Start(new ProgressNotification("Test"), 0, 0);
@ -97,6 +102,9 @@ public void failed_scan_should_not_terminated_job()
.Setup(s => s.Scan(series[1]))
.Throws(new InvalidOperationException("Bad Job"));
Mocker.GetMock<AutoIgnoreJob>()
.Setup(s => s.Start(It.IsAny<ProgressNotification>(), 0, 0));
Mocker.Resolve<DiskScanJob>().Start(new ProgressNotification("Test"), 0, 0);
@ -126,6 +134,9 @@ public void job_with_no_target_should_scan_series_with_episodes()
.Setup(s => s.Scan(series[1]))
.Returns(new List<EpisodeFile>());
Mocker.GetMock<AutoIgnoreJob>()
.Setup(s => s.Start(It.IsAny<ProgressNotification>(), 0, 0));
Mocker.Resolve<DiskScanJob>().Start(new ProgressNotification("Test"), 0, 0);

View file

@ -96,6 +96,7 @@ private void InitJobs()
Kernel.Bind<IJob>().To<AppUpdateJob>().InSingletonScope();
Kernel.Bind<IJob>().To<TrimLogsJob>().InSingletonScope();
Kernel.Bind<IJob>().To<RecentBacklogSearchJob>().InSingletonScope();
Kernel.Bind<IJob>().To<AutoIgnoreJob>().InSingletonScope();
Kernel.Get<JobProvider>().Initialize();
Kernel.Get<WebTimer>().StartTimer(30);