Fixed the broken tests

pull/3113/head
Mark McDowall 12 years ago
parent c6836e0cb1
commit 23c1c147f1

@ -78,7 +78,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
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 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
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 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
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 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
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 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
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 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
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 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
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 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
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 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
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 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
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 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
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 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
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 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
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 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
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 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
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 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
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…
Cancel
Save