From 7e045f3e3c784a93ea050476a815d5e21fd36b64 Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Mon, 4 Jan 2021 22:18:08 +0100 Subject: [PATCH] Fixed tests --- .../StandardEpisodeSearch.cs | 2 ++ .../IndexerSearchTests/NzbSearchServiceFixture.cs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/NzbDrone.Core.Test/DecisionEngineTests/Search/SingleEpisodeSearchMatchSpecificationTests/StandardEpisodeSearch.cs b/src/NzbDrone.Core.Test/DecisionEngineTests/Search/SingleEpisodeSearchMatchSpecificationTests/StandardEpisodeSearch.cs index d277afee4..a2c02ff30 100644 --- a/src/NzbDrone.Core.Test/DecisionEngineTests/Search/SingleEpisodeSearchMatchSpecificationTests/StandardEpisodeSearch.cs +++ b/src/NzbDrone.Core.Test/DecisionEngineTests/Search/SingleEpisodeSearchMatchSpecificationTests/StandardEpisodeSearch.cs @@ -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(); } diff --git a/src/NzbDrone.Core.Test/IndexerSearchTests/NzbSearchServiceFixture.cs b/src/NzbDrone.Core.Test/IndexerSearchTests/NzbSearchServiceFixture.cs index 73f91e790..da95f78d8 100644 --- a/src/NzbDrone.Core.Test/IndexerSearchTests/NzbSearchServiceFixture.cs +++ b/src/NzbDrone.Core.Test/IndexerSearchTests/NzbSearchServiceFixture.cs @@ -55,6 +55,10 @@ public void SetUp() Mocker.GetMock() .Setup(s => s.FindByTvdbId(It.IsAny())) .Returns(new List()); + + Mocker.GetMock() + .Setup(s => s.GetSceneNames(It.IsAny(), It.IsAny>(), It.IsAny>())) + .Returns(new List()); } private void WithEpisode(int seasonNumber, int episodeNumber, int? sceneSeasonNumber, int? sceneEpisodeNumber, string airDate = null)