1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-14 11:23:42 +02: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 @@ public void should_return_true_if_season_matches_after_scenemapping()
{
_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 @@ public void should_return_false_if_season_does_not_match_after_scenemapping()
{
_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 @@ public void SetUp()
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)