mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
Converted jobs to dynamic
This commit is contained in:
parent
93402f4932
commit
a4dde81ceb
42 changed files with 166 additions and 170 deletions
|
@ -51,12 +51,12 @@ namespace NzbDrone.Core.Test.JobTests
|
|||
.Returns(episodes.Select(e => e.EpisodeNumber).ToList());
|
||||
|
||||
//Act
|
||||
Mocker.Resolve<SeasonSearchJob>().Start(notification, 1, 1);
|
||||
Mocker.Resolve<SeasonSearchJob>().Start(notification, new { SeriesId = 1, SeasonNumber = 1 });
|
||||
|
||||
//Assert
|
||||
Mocker.VerifyAllMocks();
|
||||
Mocker.GetMock<SearchProvider>().Verify(c => c.PartialSeasonSearch(notification, 1, 1), Times.Once());
|
||||
Mocker.GetMock<EpisodeSearchJob>().Verify(c => c.Start(notification, It.IsAny<int>(), 0), Times.Never());
|
||||
Mocker.GetMock<EpisodeSearchJob>().Verify(c => c.Start(notification, new { EpisodeId = It.IsAny<int>() }), Times.Never());
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -75,7 +75,7 @@ namespace NzbDrone.Core.Test.JobTests
|
|||
.Returns(new List<int>());
|
||||
|
||||
//Act
|
||||
Mocker.Resolve<SeasonSearchJob>().Start(notification, 1, 1);
|
||||
Mocker.Resolve<SeasonSearchJob>().Start(notification, new { SeriesId = 1, SeasonNumber = 1 });
|
||||
|
||||
//Assert
|
||||
Mocker.VerifyAllMocks();
|
||||
|
@ -104,7 +104,7 @@ namespace NzbDrone.Core.Test.JobTests
|
|||
|
||||
|
||||
//Act
|
||||
Mocker.Resolve<SeasonSearchJob>().Start(notification, 1, 1);
|
||||
Mocker.Resolve<SeasonSearchJob>().Start(notification, new { SeriesId = 1, SeasonNumber = 1 });
|
||||
|
||||
//Assert
|
||||
Mocker.VerifyAllMocks();
|
||||
|
@ -118,11 +118,11 @@ namespace NzbDrone.Core.Test.JobTests
|
|||
.Setup(c => c.PartialSeasonSearch(notification, 1, 0)).Returns(new List<int>());
|
||||
|
||||
//Act
|
||||
Mocker.Resolve<SeasonSearchJob>().Start(notification, 1, 0);
|
||||
Mocker.Resolve<SeasonSearchJob>().Start(notification, new { SeriesId = 1, SeasonNumber = 0 });
|
||||
|
||||
//Assert
|
||||
Mocker.GetMock<SearchProvider>().Verify(c => c.PartialSeasonSearch(notification, 1, 1), Times.Never());
|
||||
Mocker.GetMock<EpisodeSearchJob>().Verify(c => c.Start(notification, It.IsAny<int>(), 0), Times.Never());
|
||||
Mocker.GetMock<EpisodeSearchJob>().Verify(c => c.Start(notification, new { EpisodeId = It.IsAny<int>() }), Times.Never());
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue