mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 05:23:31 -07:00
Fixed up tests
This commit is contained in:
parent
a4dde81ceb
commit
aa282fbd4d
13 changed files with 81 additions and 72 deletions
|
@ -6,6 +6,7 @@ using NzbDrone.Core.Jobs;
|
|||
using NzbDrone.Core.Model.Notification;
|
||||
using NzbDrone.Core.Providers;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
using NzbDrone.Test.Common;
|
||||
using NzbDrone.Test.Common.AutoMoq;
|
||||
|
||||
namespace NzbDrone.Core.Test.JobTests
|
||||
|
@ -30,14 +31,14 @@ namespace NzbDrone.Core.Test.JobTests
|
|||
.Setup(c => c.IsIgnored(It.IsAny<int>(), It.IsAny<int>())).Returns(false);
|
||||
|
||||
Mocker.GetMock<SeasonSearchJob>()
|
||||
.Setup(c => c.Start(notification, new { SeriesId = 1, SeasonNumber = It.IsAny<int>() })).Verifiable();
|
||||
.Setup(c => c.Start(notification, It.Is<object>(d => d.GetPropertyValue<int>("SeriesId") == 1 && d.GetPropertyValue<int>("SeasonNumber") >= 0))).Verifiable();
|
||||
|
||||
//Act
|
||||
Mocker.Resolve<SeriesSearchJob>().Start(notification, new { SeriesId = 1 });
|
||||
|
||||
//Assert
|
||||
Mocker.VerifyAllMocks();
|
||||
Mocker.GetMock<SeasonSearchJob>().Verify(c => c.Start(notification, new { SeriesId = 1, SeasonNumber = It.IsAny<int>() }),
|
||||
Mocker.GetMock<SeasonSearchJob>().Verify(c => c.Start(notification, It.Is<object>(d => d.GetPropertyValue<int>("SeriesId") == 1 && d.GetPropertyValue<int>("SeasonNumber") >= 0)),
|
||||
Times.Exactly(seasons.Count));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue