Converted jobs to dynamic

This commit is contained in:
Mark McDowall 2012-09-10 12:04:17 -07:00
commit a4dde81ceb
42 changed files with 166 additions and 170 deletions

View file

@ -41,10 +41,10 @@ namespace NzbDrone.Core.Test.JobTests
.Setup(s => s.EpisodesWithoutFiles(true)).Returns(episodes);
//Act
Mocker.Resolve<RecentBacklogSearchJob>().Start(MockNotification, 0, 0);
Mocker.Resolve<RecentBacklogSearchJob>().Start(MockNotification, null);
//Assert
Mocker.GetMock<EpisodeSearchJob>().Verify(c => c.Start(MockNotification, It.IsAny<int>(), 0),
Mocker.GetMock<EpisodeSearchJob>().Verify(c => c.Start(MockNotification, new { EpisodeId = It.IsAny<int>() }),
Times.Never());
}
@ -87,13 +87,13 @@ namespace NzbDrone.Core.Test.JobTests
Mocker.GetMock<EpisodeProvider>()
.Setup(s => s.EpisodesWithoutFiles(true)).Returns(episodes);
Mocker.GetMock<EpisodeSearchJob>().Setup(c => c.Start(It.IsAny<ProgressNotification>(), It.IsAny<int>(), 0));
Mocker.GetMock<EpisodeSearchJob>().Setup(c => c.Start(It.IsAny<ProgressNotification>(), new { EpisodeId = It.IsAny<int>() }));
//Act
Mocker.Resolve<RecentBacklogSearchJob>().Start(MockNotification, 0, 0);
Mocker.Resolve<RecentBacklogSearchJob>().Start(MockNotification, null);
//Assert
Mocker.GetMock<EpisodeSearchJob>().Verify(c => c.Start(It.IsAny<ProgressNotification>(), It.IsAny<int>(), 0),
Mocker.GetMock<EpisodeSearchJob>().Verify(c => c.Start(It.IsAny<ProgressNotification>(), new { EpisodeId = It.IsAny<int>() }),
Times.Exactly(40));
}