mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-26 09:37:12 +00:00
Fixed the broken tests
This commit is contained in:
parent
c6836e0cb1
commit
23c1c147f1
3 changed files with 18 additions and 18 deletions
|
@ -78,7 +78,7 @@ public void IsAcceptableSize_true_single_episode_not_first_or_last_30_minute()
|
|||
parseResultSingle.Series = series30minutes;
|
||||
parseResultSingle.Size = 184572800;
|
||||
|
||||
Mocker.GetMock<QualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
Mocker.GetMock<IQualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
|
@ -99,7 +99,7 @@ public void IsAcceptableSize_true_single_episode_not_first_or_last_60_minute()
|
|||
parseResultSingle.Series = series60minutes;
|
||||
parseResultSingle.Size = 368572800;
|
||||
|
||||
Mocker.GetMock<QualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
Mocker.GetMock<IQualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
|
@ -120,7 +120,7 @@ public void IsAcceptableSize_false_single_episode_not_first_or_last_30_minute()
|
|||
parseResultSingle.Series = series30minutes;
|
||||
parseResultSingle.Size = 1.Gigabytes();
|
||||
|
||||
Mocker.GetMock<QualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
Mocker.GetMock<IQualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
|
@ -141,7 +141,7 @@ public void IsAcceptableSize_false_single_episode_not_first_or_last_60_minute()
|
|||
parseResultSingle.Series = series60minutes;
|
||||
parseResultSingle.Size = 1.Gigabytes();
|
||||
|
||||
Mocker.GetMock<QualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
Mocker.GetMock<IQualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
|
@ -162,7 +162,7 @@ public void IsAcceptableSize_true_multi_episode_not_first_or_last_30_minute()
|
|||
parseResultMulti.Series = series30minutes;
|
||||
parseResultMulti.Size = 184572800;
|
||||
|
||||
Mocker.GetMock<QualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
Mocker.GetMock<IQualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
|
@ -183,7 +183,7 @@ public void IsAcceptableSize_true_multi_episode_not_first_or_last_60_minute()
|
|||
parseResultMulti.Series = series60minutes;
|
||||
parseResultMulti.Size = 368572800;
|
||||
|
||||
Mocker.GetMock<QualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
Mocker.GetMock<IQualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
|
@ -204,7 +204,7 @@ public void IsAcceptableSize_false_multi_episode_not_first_or_last_30_minute()
|
|||
parseResultMulti.Series = series30minutes;
|
||||
parseResultMulti.Size = 1.Gigabytes();
|
||||
|
||||
Mocker.GetMock<QualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
Mocker.GetMock<IQualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
|
@ -225,7 +225,7 @@ public void IsAcceptableSize_false_multi_episode_not_first_or_last_60_minute()
|
|||
parseResultMulti.Series = series60minutes;
|
||||
parseResultMulti.Size = 10.Gigabytes();
|
||||
|
||||
Mocker.GetMock<QualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
Mocker.GetMock<IQualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
|
@ -246,7 +246,7 @@ public void IsAcceptableSize_true_single_episode_first_30_minute()
|
|||
parseResultSingle.Series = series30minutes;
|
||||
parseResultSingle.Size = 184572800;
|
||||
|
||||
Mocker.GetMock<QualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
Mocker.GetMock<IQualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
|
@ -267,7 +267,7 @@ public void IsAcceptableSize_true_single_episode_first_60_minute()
|
|||
parseResultSingle.Series = series60minutes;
|
||||
parseResultSingle.Size = 368572800;
|
||||
|
||||
Mocker.GetMock<QualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
Mocker.GetMock<IQualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
|
@ -288,7 +288,7 @@ public void IsAcceptableSize_false_single_episode_first_30_minute()
|
|||
parseResultSingle.Series = series30minutes;
|
||||
parseResultSingle.Size = 1.Gigabytes();
|
||||
|
||||
Mocker.GetMock<QualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
Mocker.GetMock<IQualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
|
@ -309,7 +309,7 @@ public void IsAcceptableSize_false_single_episode_first_60_minute()
|
|||
parseResultSingle.Series = series60minutes;
|
||||
parseResultSingle.Size = 10.Gigabytes();
|
||||
|
||||
Mocker.GetMock<QualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
Mocker.GetMock<IQualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
|
@ -331,7 +331,7 @@ public void IsAcceptableSize_true_unlimited_30_minute()
|
|||
parseResultSingle.Size = 18457280000;
|
||||
qualityType.MaxSize = 0;
|
||||
|
||||
Mocker.GetMock<QualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
Mocker.GetMock<IQualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
|
@ -353,7 +353,7 @@ public void IsAcceptableSize_true_unlimited_60_minute()
|
|||
parseResultSingle.Size = 36857280000;
|
||||
qualityType.MaxSize = 0;
|
||||
|
||||
Mocker.GetMock<QualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
Mocker.GetMock<IQualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
|
@ -376,7 +376,7 @@ public void IsAcceptableSize_should_treat_daily_series_as_single_episode()
|
|||
|
||||
qualityType.MaxSize = (int)600.Megabytes();
|
||||
|
||||
Mocker.GetMock<QualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
Mocker.GetMock<IQualitySizeService>().Setup(s => s.Get(1)).Returns(qualityType);
|
||||
|
||||
Mocker.GetMock<IEpisodeService>().Setup(
|
||||
s => s.IsFirstOrLastEpisodeOfSeason(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
|
||||
|
|
|
@ -21,7 +21,7 @@ public class UpgradePossibleSpecificationFixture : CoreTest
|
|||
private void WithWebdlCutoff()
|
||||
{
|
||||
var profile = new QualityProfile { Cutoff = Quality.WEBDL720p };
|
||||
Mocker.GetMock<QualityProfileService>().Setup(s => s.Get(It.IsAny<int>())).Returns(profile);
|
||||
Mocker.GetMock<IQualityProfileService>().Setup(s => s.Get(It.IsAny<int>())).Returns(profile);
|
||||
}
|
||||
|
||||
private Series _series;
|
||||
|
|
|
@ -10,11 +10,11 @@ namespace NzbDrone.Core.DecisionEngine
|
|||
{
|
||||
public class AcceptableSizeSpecification
|
||||
{
|
||||
private readonly QualitySizeService _qualityTypeProvider;
|
||||
private readonly IQualitySizeService _qualityTypeProvider;
|
||||
private readonly IEpisodeService _episodeService;
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public AcceptableSizeSpecification(QualitySizeService qualityTypeProvider, IEpisodeService episodeService)
|
||||
public AcceptableSizeSpecification(IQualitySizeService qualityTypeProvider, IEpisodeService episodeService)
|
||||
{
|
||||
_qualityTypeProvider = qualityTypeProvider;
|
||||
_episodeService = episodeService;
|
||||
|
|
Loading…
Reference in a new issue