mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
Fixed up tests
This commit is contained in:
parent
a4dde81ceb
commit
aa282fbd4d
13 changed files with 81 additions and 72 deletions
|
@ -13,6 +13,7 @@ using NzbDrone.Core.Providers;
|
|||
using NzbDrone.Core.Providers.Core;
|
||||
using NzbDrone.Core.Repository;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
using NzbDrone.Test.Common;
|
||||
using NzbDrone.Test.Common.AutoMoq;
|
||||
|
||||
namespace NzbDrone.Core.Test.JobTests
|
||||
|
@ -87,13 +88,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>(), new { EpisodeId = It.IsAny<int>() }));
|
||||
Mocker.GetMock<EpisodeSearchJob>().Setup(c => c.Start(It.IsAny<ProgressNotification>(), It.Is<object>(d => d.GetPropertyValue<int>("EpisodeId") >= 0)));
|
||||
|
||||
//Act
|
||||
Mocker.Resolve<RecentBacklogSearchJob>().Start(MockNotification, null);
|
||||
|
||||
//Assert
|
||||
Mocker.GetMock<EpisodeSearchJob>().Verify(c => c.Start(It.IsAny<ProgressNotification>(), new { EpisodeId = It.IsAny<int>() }),
|
||||
Mocker.GetMock<EpisodeSearchJob>().Verify(c => c.Start(It.IsAny<ProgressNotification>(), It.Is<object>(d => d.GetPropertyValue<int>("EpisodeId") >= 0)),
|
||||
Times.Exactly(40));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue