mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Fixed up tests
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user