1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-22 22:16:13 -04:00
This commit is contained in:
Qstick
2021-08-03 00:43:28 -04:00
committed by Mark McDowall
parent 878d1561aa
commit 1c22a1ec0d
1201 changed files with 5620 additions and 4303 deletions
@@ -1,18 +1,18 @@
using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Profiles.Qualities;
using NzbDrone.Core.Qualities;
using NzbDrone.Core.DecisionEngine.Specifications;
using NzbDrone.Core.Test.Framework;
using NzbDrone.Core.Languages;
using NzbDrone.Core.Profiles.Languages;
using NzbDrone.Core.Profiles.Qualities;
using NzbDrone.Core.Qualities;
using NzbDrone.Core.Test.Framework;
using NzbDrone.Core.Test.Languages;
namespace NzbDrone.Core.Test.DecisionEngineTests
{
[TestFixture]
public class UpgradeSpecificationFixture : CoreTest<UpgradableSpecification>
{
public static object[] IsUpgradeTestCases =
@@ -45,12 +45,12 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
.Returns(type);
}
[Test, TestCaseSource(nameof(IsUpgradeTestCases))]
[Test]
[TestCaseSource(nameof(IsUpgradeTestCases))]
public void IsUpgradeTest(Quality current, int currentVersion, Quality newQuality, int newVersion, Quality cutoff, bool expected)
{
GivenAutoDownloadPropers(ProperDownloadTypes.PreferAndUpgrade);
var profile = new QualityProfile
{
UpgradeAllowed = true,
@@ -76,7 +76,8 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
.Should().Be(expected);
}
[Test, TestCaseSource("IsUpgradeTestCasesLanguages")]
[Test]
[TestCaseSource("IsUpgradeTestCasesLanguages")]
public void IsUpgradeTestLanguage(Quality current, int currentVersion, Language currentLanguage, Quality newQuality, int newVersion, Language newLanguage, Quality cutoff, Language languageCutoff, bool expected)
{
GivenAutoDownloadPropers(ProperDownloadTypes.PreferAndUpgrade);
@@ -112,8 +113,8 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
{
GivenAutoDownloadPropers(ProperDownloadTypes.DoNotUpgrade);
var profile = new QualityProfile
{
var profile = new QualityProfile
{
Items = Qualities.QualityFixture.GetDefaultQualities(),
};
@@ -123,7 +124,6 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
Cutoff = Language.English
};
Subject.IsUpgradable(
profile,
langProfile,
@@ -152,7 +152,6 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
Cutoff = Language.English
};
Subject.IsUpgradable(
profile,
langProfile,