mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-15 20:54:58 +00:00
Additional enumerable extensions tests
This commit is contained in:
@@ -374,6 +374,29 @@ namespace ICD.Common.Utils.Tests.Extensions
|
|||||||
Assert.AreEqual("C", values[2]);
|
Assert.AreEqual("C", values[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void DistinctTest()
|
||||||
|
{
|
||||||
|
string[] items =
|
||||||
|
{
|
||||||
|
"one",
|
||||||
|
"two",
|
||||||
|
"three"
|
||||||
|
};
|
||||||
|
|
||||||
|
items = items.Distinct(i => i.Length).ToArray();
|
||||||
|
|
||||||
|
Assert.AreEqual(2, items.Length);
|
||||||
|
Assert.AreEqual("one", items[0]);
|
||||||
|
Assert.AreEqual("three", items[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void DistinctComparerTest()
|
||||||
|
{
|
||||||
|
Assert.Inconclusive();
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void UnanimousTest()
|
public void UnanimousTest()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user