|
|
|
@ -13,8 +13,8 @@ namespace NzbDrone.Core.Test
|
|
|
|
|
[Test]
|
|
|
|
|
public void Icomparer_greater_test()
|
|
|
|
|
{
|
|
|
|
|
var first = new Quality(QualityTypes.DVD, true);
|
|
|
|
|
var second = new Quality(QualityTypes.Bluray1080p, true);
|
|
|
|
|
var first = new QualityModel(QualityTypes.DVD, true);
|
|
|
|
|
var second = new QualityModel(QualityTypes.Bluray1080p, true);
|
|
|
|
|
|
|
|
|
|
second.Should().BeGreaterThan(first);
|
|
|
|
|
}
|
|
|
|
@ -22,8 +22,8 @@ namespace NzbDrone.Core.Test
|
|
|
|
|
[Test]
|
|
|
|
|
public void Icomparer_greater_proper()
|
|
|
|
|
{
|
|
|
|
|
var first = new Quality(QualityTypes.Bluray1080p, false);
|
|
|
|
|
var second = new Quality(QualityTypes.Bluray1080p, true);
|
|
|
|
|
var first = new QualityModel(QualityTypes.Bluray1080p, false);
|
|
|
|
|
var second = new QualityModel(QualityTypes.Bluray1080p, true);
|
|
|
|
|
|
|
|
|
|
second.Should().BeGreaterThan(first);
|
|
|
|
|
}
|
|
|
|
@ -31,8 +31,8 @@ namespace NzbDrone.Core.Test
|
|
|
|
|
[Test]
|
|
|
|
|
public void Icomparer_lesser()
|
|
|
|
|
{
|
|
|
|
|
var first = new Quality(QualityTypes.DVD, true);
|
|
|
|
|
var second = new Quality(QualityTypes.Bluray1080p, true);
|
|
|
|
|
var first = new QualityModel(QualityTypes.DVD, true);
|
|
|
|
|
var second = new QualityModel(QualityTypes.Bluray1080p, true);
|
|
|
|
|
|
|
|
|
|
first.Should().BeLessThan(second);
|
|
|
|
|
}
|
|
|
|
@ -40,8 +40,8 @@ namespace NzbDrone.Core.Test
|
|
|
|
|
[Test]
|
|
|
|
|
public void Icomparer_lesser_proper()
|
|
|
|
|
{
|
|
|
|
|
var first = new Quality(QualityTypes.DVD, false);
|
|
|
|
|
var second = new Quality(QualityTypes.DVD, true);
|
|
|
|
|
var first = new QualityModel(QualityTypes.DVD, false);
|
|
|
|
|
var second = new QualityModel(QualityTypes.DVD, true);
|
|
|
|
|
|
|
|
|
|
first.Should().BeLessThan(second);
|
|
|
|
|
}
|
|
|
|
@ -49,8 +49,8 @@ namespace NzbDrone.Core.Test
|
|
|
|
|
[Test]
|
|
|
|
|
public void equal_operand()
|
|
|
|
|
{
|
|
|
|
|
var first = new Quality(QualityTypes.Bluray1080p, true);
|
|
|
|
|
var second = new Quality(QualityTypes.Bluray1080p, true);
|
|
|
|
|
var first = new QualityModel(QualityTypes.Bluray1080p, true);
|
|
|
|
|
var second = new QualityModel(QualityTypes.Bluray1080p, true);
|
|
|
|
|
|
|
|
|
|
(first == second).Should().BeTrue();
|
|
|
|
|
(first >= second).Should().BeTrue();
|
|
|
|
@ -60,8 +60,8 @@ namespace NzbDrone.Core.Test
|
|
|
|
|
[Test]
|
|
|
|
|
public void equal_operand_false()
|
|
|
|
|
{
|
|
|
|
|
var first = new Quality(QualityTypes.Bluray1080p, true);
|
|
|
|
|
var second = new Quality(QualityTypes.Unknown, true);
|
|
|
|
|
var first = new QualityModel(QualityTypes.Bluray1080p, true);
|
|
|
|
|
var second = new QualityModel(QualityTypes.Unknown, true);
|
|
|
|
|
|
|
|
|
|
(first == second).Should().BeFalse();
|
|
|
|
|
}
|
|
|
|
@ -69,8 +69,8 @@ namespace NzbDrone.Core.Test
|
|
|
|
|
[Test]
|
|
|
|
|
public void equal_operand_false_proper()
|
|
|
|
|
{
|
|
|
|
|
var first = new Quality(QualityTypes.Bluray1080p, true);
|
|
|
|
|
var second = new Quality(QualityTypes.Bluray1080p, false);
|
|
|
|
|
var first = new QualityModel(QualityTypes.Bluray1080p, true);
|
|
|
|
|
var second = new QualityModel(QualityTypes.Bluray1080p, false);
|
|
|
|
|
|
|
|
|
|
(first == second).Should().BeFalse();
|
|
|
|
|
}
|
|
|
|
@ -79,8 +79,8 @@ namespace NzbDrone.Core.Test
|
|
|
|
|
[Test]
|
|
|
|
|
public void not_equal_operand()
|
|
|
|
|
{
|
|
|
|
|
var first = new Quality(QualityTypes.Bluray1080p, true);
|
|
|
|
|
var second = new Quality(QualityTypes.Bluray1080p, true);
|
|
|
|
|
var first = new QualityModel(QualityTypes.Bluray1080p, true);
|
|
|
|
|
var second = new QualityModel(QualityTypes.Bluray1080p, true);
|
|
|
|
|
|
|
|
|
|
(first != second).Should().BeFalse();
|
|
|
|
|
}
|
|
|
|
@ -88,8 +88,8 @@ namespace NzbDrone.Core.Test
|
|
|
|
|
[Test]
|
|
|
|
|
public void not_equal_operand_false()
|
|
|
|
|
{
|
|
|
|
|
var first = new Quality(QualityTypes.Bluray1080p, true);
|
|
|
|
|
var second = new Quality(QualityTypes.Unknown, true);
|
|
|
|
|
var first = new QualityModel(QualityTypes.Bluray1080p, true);
|
|
|
|
|
var second = new QualityModel(QualityTypes.Unknown, true);
|
|
|
|
|
|
|
|
|
|
(first != second).Should().BeTrue();
|
|
|
|
|
}
|
|
|
|
@ -97,8 +97,8 @@ namespace NzbDrone.Core.Test
|
|
|
|
|
[Test]
|
|
|
|
|
public void not_equal_operand_false_proper()
|
|
|
|
|
{
|
|
|
|
|
var first = new Quality(QualityTypes.Bluray1080p, true);
|
|
|
|
|
var second = new Quality(QualityTypes.Bluray1080p, false);
|
|
|
|
|
var first = new QualityModel(QualityTypes.Bluray1080p, true);
|
|
|
|
|
var second = new QualityModel(QualityTypes.Bluray1080p, false);
|
|
|
|
|
|
|
|
|
|
(first != second).Should().BeTrue();
|
|
|
|
|
}
|
|
|
|
@ -106,8 +106,8 @@ namespace NzbDrone.Core.Test
|
|
|
|
|
[Test]
|
|
|
|
|
public void greater_operand()
|
|
|
|
|
{
|
|
|
|
|
var first = new Quality(QualityTypes.DVD, true);
|
|
|
|
|
var second = new Quality(QualityTypes.Bluray1080p, true);
|
|
|
|
|
var first = new QualityModel(QualityTypes.DVD, true);
|
|
|
|
|
var second = new QualityModel(QualityTypes.Bluray1080p, true);
|
|
|
|
|
|
|
|
|
|
(first < second).Should().BeTrue();
|
|
|
|
|
(first <= second).Should().BeTrue();
|
|
|
|
@ -116,8 +116,8 @@ namespace NzbDrone.Core.Test
|
|
|
|
|
[Test]
|
|
|
|
|
public void lesser_operand()
|
|
|
|
|
{
|
|
|
|
|
var first = new Quality(QualityTypes.DVD, true);
|
|
|
|
|
var second = new Quality(QualityTypes.Bluray1080p, true);
|
|
|
|
|
var first = new QualityModel(QualityTypes.DVD, true);
|
|
|
|
|
var second = new QualityModel(QualityTypes.Bluray1080p, true);
|
|
|
|
|
|
|
|
|
|
(second > first).Should().BeTrue();
|
|
|
|
|
(second >= first).Should().BeTrue();
|
|
|
|
|