mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-17 13:45:05 +00:00
Tidying
This commit is contained in:
@@ -201,25 +201,19 @@ namespace ICD.Common.Utils.Tests.Extensions
|
||||
|
||||
[Test]
|
||||
public void DictionaryEqualTest()
|
||||
{
|
||||
Assert.Inconclusive();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DictionaryEqualComparerTest()
|
||||
{
|
||||
Dictionary<int, int> a = new Dictionary<int, int>
|
||||
{
|
||||
{1, 10},
|
||||
{2, 20},
|
||||
{ 3, 30 },
|
||||
{3, 30}
|
||||
};
|
||||
|
||||
Dictionary<int, int> b = new Dictionary<int, int>
|
||||
{
|
||||
{1, 10},
|
||||
{2, 20},
|
||||
{ 3, 30 },
|
||||
{3, 30}
|
||||
};
|
||||
|
||||
Dictionary<int, int> c = new Dictionary<int, int>
|
||||
@@ -236,11 +230,41 @@ namespace ICD.Common.Utils.Tests.Extensions
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DictionaryEqualFuncComparerTest()
|
||||
public void DictionaryEqualComparerTest()
|
||||
{
|
||||
Assert.Inconclusive();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DictionaryEqualFuncComparerTest()
|
||||
{
|
||||
Dictionary<int, int> a = new Dictionary<int, int>
|
||||
{
|
||||
{1, 10},
|
||||
{2, 20},
|
||||
{3, 30}
|
||||
};
|
||||
|
||||
Dictionary<int, int> b = new Dictionary<int, int>
|
||||
{
|
||||
{1, 10},
|
||||
{2, 20},
|
||||
{3, 30}
|
||||
};
|
||||
|
||||
Dictionary<int, int> c = new Dictionary<int, int>
|
||||
{
|
||||
{1, 10},
|
||||
{2, 20}
|
||||
};
|
||||
|
||||
Assert.IsTrue(a.DictionaryEqual(b, (left, right) => left / 10 == right / 10));
|
||||
Assert.IsTrue(b.DictionaryEqual(a, (left, right) => left / 10 == right / 10));
|
||||
|
||||
Assert.IsFalse(a.DictionaryEqual(c, (left, right) => left / 10 == right / 10));
|
||||
Assert.IsFalse(c.DictionaryEqual(a, (left, right) => left / 10 == right / 10));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void OrderByKeyTest()
|
||||
{
|
||||
@@ -248,7 +272,7 @@ namespace ICD.Common.Utils.Tests.Extensions
|
||||
{
|
||||
{1, 10},
|
||||
{2, 20},
|
||||
{ 3, 30 },
|
||||
{3, 30}
|
||||
};
|
||||
|
||||
KeyValuePair<int, int>[] ordered = a.OrderByKey().ToArray();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ICD.Common.Properties;
|
||||
#if SIMPLSHARP
|
||||
using Crestron.SimplSharp.Reflection;
|
||||
#else
|
||||
@@ -12,16 +13,19 @@ namespace ICD.Common.Utils.Tests
|
||||
[TestFixture]
|
||||
public sealed class ReflectionUtilsTest
|
||||
{
|
||||
[UsedImplicitly]
|
||||
private string TestProperty { get; set; }
|
||||
|
||||
[UsedImplicitly]
|
||||
private void TestMethod(string param1, int param2)
|
||||
{
|
||||
}
|
||||
|
||||
private class TestClass
|
||||
[UsedImplicitly]
|
||||
private sealed class TestClass
|
||||
{
|
||||
public string Param1 { get; set; }
|
||||
public int Param2 { get; set; }
|
||||
public string Param1 { get; }
|
||||
public int Param2 { get; }
|
||||
|
||||
public TestClass(string param1, int param2)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user