mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-01-11 19:44:55 +00:00
test: Moved version comparer tests from settings
This commit is contained in:
@@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using ICD.Common.Utils.Comparers;
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
namespace ICD.Common.Utils.Tests.Comparers
|
||||||
|
{
|
||||||
|
[TestFixture]
|
||||||
|
public sealed class UndefinedVersionComparerTest
|
||||||
|
{
|
||||||
|
[Test]
|
||||||
|
public void CompareToTest()
|
||||||
|
{
|
||||||
|
Assert.AreEqual(0, UndefinedVersionComparer.Instance.Compare(new Version(0, 0), new Version(0, 0, 0, 0)));
|
||||||
|
Assert.AreEqual(-1, UndefinedVersionComparer.Instance.Compare(new Version(0, 0), new Version(1, 0, 0, 0)));
|
||||||
|
Assert.AreEqual(1, UndefinedVersionComparer.Instance.Compare(new Version(1, 0), new Version(0, 0, 0, 0)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using ICD.Common.Utils.Comparers;
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
namespace ICD.Common.Utils.Tests.Comparers
|
||||||
|
{
|
||||||
|
[TestFixture]
|
||||||
|
public sealed class UndefinedVersionEqualityComparerTest
|
||||||
|
{
|
||||||
|
[Test]
|
||||||
|
public void Equals()
|
||||||
|
{
|
||||||
|
Assert.IsTrue(UndefinedVersionEqualityComparer.Instance.Equals(new Version(0, 0), new Version(0, 0, 0, 0)));
|
||||||
|
Assert.IsFalse(UndefinedVersionEqualityComparer.Instance.Equals(new Version(0, 0), new Version(1, 0, 0, 0)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user