diff --git a/NzbDrone.Core.Test/JobTests/DiskScanJobTest.cs b/NzbDrone.Core.Test/JobTests/DiskScanJobTest.cs index c9177f841..677bf7c4d 100644 --- a/NzbDrone.Core.Test/JobTests/DiskScanJobTest.cs +++ b/NzbDrone.Core.Test/JobTests/DiskScanJobTest.cs @@ -37,6 +37,8 @@ public void series_specific_scan_should_scan_series() .Setup(p => p.Scan(series)) .Returns(new List()); + Mocker.GetMock() + .Setup(s => s.Start(It.IsAny(), 0, 0)); //Act Mocker.Resolve().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()); + Mocker.GetMock() + .Setup(s => s.Start(It.IsAny(), 0, 0)); + Mocker.Resolve().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() + .Setup(s => s.Start(It.IsAny(), 0, 0)); + Mocker.Resolve().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()); + Mocker.GetMock() + .Setup(s => s.Start(It.IsAny(), 0, 0)); + Mocker.Resolve().Start(new ProgressNotification("Test"), 0, 0); diff --git a/NzbDrone.Core/CentralDispatch.cs b/NzbDrone.Core/CentralDispatch.cs index ffc289e01..b41f4a7e1 100644 --- a/NzbDrone.Core/CentralDispatch.cs +++ b/NzbDrone.Core/CentralDispatch.cs @@ -96,6 +96,7 @@ private void InitJobs() Kernel.Bind().To().InSingletonScope(); Kernel.Bind().To().InSingletonScope(); Kernel.Bind().To().InSingletonScope(); + Kernel.Bind().To().InSingletonScope(); Kernel.Get().Initialize(); Kernel.Get().StartTimer(30);