|
|
|
@ -59,7 +59,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|
|
|
|
_reports = new List<ReportInfo> { new ReportInfo { Title = "The.Office.S03E115.DVDRip.XviD-OSiTV" } };
|
|
|
|
|
_remoteEpisode = new RemoteEpisode { Series = new Series() };
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IParsingService>().Setup(c => c.Map(It.IsAny<ParsedEpisodeInfo>()))
|
|
|
|
|
Mocker.GetMock<IParsingService>().Setup(c => c.Map(It.IsAny<ParsedEpisodeInfo>(), It.IsAny<int>()))
|
|
|
|
|
.Returns(_remoteEpisode);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -130,7 +130,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|
|
|
|
|
|
|
|
|
var results = Subject.GetRssDecision(_reports).ToList();
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IParsingService>().Verify(c => c.Map(It.IsAny<ParsedEpisodeInfo>()), Times.Never());
|
|
|
|
|
Mocker.GetMock<IParsingService>().Verify(c => c.Map(It.IsAny<ParsedEpisodeInfo>(), It.IsAny<int>()), Times.Never());
|
|
|
|
|
|
|
|
|
|
_pass1.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>(), null), Times.Never());
|
|
|
|
|
_pass2.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>(), null), Times.Never());
|
|
|
|
@ -146,7 +146,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|
|
|
|
|
|
|
|
|
var results = Subject.GetRssDecision(_reports).ToList();
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IParsingService>().Verify(c => c.Map(It.IsAny<ParsedEpisodeInfo>()), Times.Never());
|
|
|
|
|
Mocker.GetMock<IParsingService>().Verify(c => c.Map(It.IsAny<ParsedEpisodeInfo>(), It.IsAny<int>()), Times.Never());
|
|
|
|
|
|
|
|
|
|
_pass1.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>(), null), Times.Never());
|
|
|
|
|
_pass2.Verify(c => c.IsSatisfiedBy(It.IsAny<RemoteEpisode>(), null), Times.Never());
|
|
|
|
@ -174,7 +174,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|
|
|
|
{
|
|
|
|
|
GivenSpecifications(_pass1);
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IParsingService>().Setup(c => c.Map(It.IsAny<ParsedEpisodeInfo>()))
|
|
|
|
|
Mocker.GetMock<IParsingService>().Setup(c => c.Map(It.IsAny<ParsedEpisodeInfo>(), It.IsAny<int>()))
|
|
|
|
|
.Throws<TestException>();
|
|
|
|
|
|
|
|
|
|
_reports = new List<ReportInfo>
|
|
|
|
@ -186,7 +186,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|
|
|
|
|
|
|
|
|
Subject.GetRssDecision(_reports);
|
|
|
|
|
|
|
|
|
|
Mocker.GetMock<IParsingService>().Verify(c => c.Map(It.IsAny<ParsedEpisodeInfo>()), Times.Exactly(_reports.Count));
|
|
|
|
|
Mocker.GetMock<IParsingService>().Verify(c => c.Map(It.IsAny<ParsedEpisodeInfo>(), It.IsAny<int>()), Times.Exactly(_reports.Count));
|
|
|
|
|
|
|
|
|
|
ExceptionVerification.ExpectedErrors(3);
|
|
|
|
|
}
|
|
|
|
|