1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-10-30 15:32:31 +01:00

Fixed tests

This commit is contained in:
Taloth Saldono 2021-01-04 22:18:08 +01:00
parent f4d14301f1
commit 7e045f3e3c
2 changed files with 6 additions and 0 deletions

View File

@ -42,6 +42,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests.Search.SingleEpisodeSearchMatch
{
_remoteEpisode.ParsedEpisodeInfo.SeasonNumber = 10;
_remoteEpisode.MappedSeasonNumber = 5; // 10 -> 5 mapping
_searchCriteria.SeasonNumber = 10; // searching by tvdb 5 = 10 scene
Subject.IsSatisfiedBy(_remoteEpisode, _searchCriteria).Accepted.Should().BeTrue();
}
@ -51,6 +52,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests.Search.SingleEpisodeSearchMatch
{
_remoteEpisode.ParsedEpisodeInfo.SeasonNumber = 10;
_remoteEpisode.MappedSeasonNumber = 6; // 9 -> 5 mapping
_searchCriteria.SeasonNumber = 9; // searching by tvdb 5 = 9 scene
Subject.IsSatisfiedBy(_remoteEpisode, _searchCriteria).Accepted.Should().BeFalse();
}

View File

@ -55,6 +55,10 @@ namespace NzbDrone.Core.Test.IndexerSearchTests
Mocker.GetMock<ISceneMappingService>()
.Setup(s => s.FindByTvdbId(It.IsAny<int>()))
.Returns(new List<SceneMapping>());
Mocker.GetMock<ISceneMappingService>()
.Setup(s => s.GetSceneNames(It.IsAny<int>(), It.IsAny<List<int>>(), It.IsAny<List<int>>()))
.Returns(new List<string>());
}
private void WithEpisode(int seasonNumber, int episodeNumber, int? sceneSeasonNumber, int? sceneEpisodeNumber, string airDate = null)