New: Custom Formats

Co-Authored-By: ta264 <ta264@users.noreply.github.com>
This commit is contained in:
Qstick
2022-01-23 23:42:41 -06:00
parent 4a3062deae
commit dbb6ef7664
185 changed files with 6974 additions and 810 deletions
@@ -2,6 +2,7 @@ using System.Collections.Generic;
using FluentAssertions;
using NUnit.Framework;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.CustomFormats;
using NzbDrone.Core.DecisionEngine.Specifications;
using NzbDrone.Core.Profiles.Qualities;
using NzbDrone.Core.Qualities;
@@ -23,8 +24,6 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
new object[] { Quality.MP3, 1, Quality.MP3, 1, Quality.MP3, false }
};
private static readonly int NoPreferredWordScore = 0;
private void GivenAutoDownloadPropers(ProperDownloadTypes type)
{
Mocker.GetMock<IConfigService>()
@@ -47,9 +46,9 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
Subject.IsUpgradable(
profile,
new QualityModel(current, new Revision(version: currentVersion)),
NoPreferredWordScore,
new List<CustomFormat>(),
new QualityModel(newQuality, new Revision(version: newVersion)),
NoPreferredWordScore)
new List<CustomFormat>())
.Should().Be(expected);
}
@@ -66,9 +65,9 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
Subject.IsUpgradable(
profile,
new QualityModel(Quality.MP3, new Revision(version: 1)),
NoPreferredWordScore,
new List<CustomFormat>(),
new QualityModel(Quality.MP3, new Revision(version: 2)),
NoPreferredWordScore)
new List<CustomFormat>())
.Should().BeTrue();
}
@@ -85,9 +84,9 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
Subject.IsUpgradable(
profile,
new QualityModel(Quality.MP3, new Revision(version: 1)),
NoPreferredWordScore,
new List<CustomFormat>(),
new QualityModel(Quality.MP3, new Revision(version: 2)),
NoPreferredWordScore)
new List<CustomFormat>())
.Should().BeFalse();
}
}