mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
some preliminary work to move decision engine to use the visitor pattern.
This commit is contained in:
parent
969dff5197
commit
02d842a2b2
51 changed files with 470 additions and 507 deletions
|
@ -3,6 +3,7 @@
|
|||
using System.Linq;
|
||||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.DecisionEngine.Specifications;
|
||||
using NzbDrone.Core.Qualities;
|
||||
using NzbDrone.Core.Tv;
|
||||
using NzbDrone.Core.Model;
|
||||
|
@ -13,7 +14,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
{
|
||||
[TestFixture]
|
||||
// ReSharper disable InconsistentNaming
|
||||
public class QualityUpgradeSpecificationFixture : CoreTest
|
||||
public class QualityUpgradeSpecificationFixture : CoreTest<QualityUpgradableSpecification>
|
||||
{
|
||||
public static object[] IsUpgradeTestCases =
|
||||
{
|
||||
|
@ -31,7 +32,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|||
[Test, TestCaseSource("IsUpgradeTestCases")]
|
||||
public void IsUpgradeTest(Quality current, bool currentProper, Quality newQuality, bool newProper, Quality cutoff, bool expected)
|
||||
{
|
||||
new QualityUpgradeSpecification().IsSatisfiedBy(new QualityModel(current, currentProper), new QualityModel(newQuality, newProper), cutoff)
|
||||
Subject.IsUpgradable(new QualityProfile() { Cutoff = cutoff }, new QualityModel(current, currentProper), new QualityModel(newQuality, newProper))
|
||||
.Should().Be(expected);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue