mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-15 12:45:01 +00:00
test: Updating TypeExtensionsTest
This commit is contained in:
@@ -86,6 +86,12 @@ namespace ICD.Common.Utils.Tests.Extensions
|
|||||||
Assert.AreEqual(expected, value.IsIntegerNumeric());
|
Assert.AreEqual(expected, value.IsIntegerNumeric());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void GetAssemblyTest()
|
||||||
|
{
|
||||||
|
Assert.Inconclusive();
|
||||||
|
}
|
||||||
|
|
||||||
[TestCase(typeof(string), typeof(object), true)]
|
[TestCase(typeof(string), typeof(object), true)]
|
||||||
[TestCase(typeof(object), typeof(string), false)]
|
[TestCase(typeof(object), typeof(string), false)]
|
||||||
public void IsAssignableToTest(Type a, Type b, bool expected)
|
public void IsAssignableToTest(Type a, Type b, bool expected)
|
||||||
@@ -134,6 +140,27 @@ namespace ICD.Common.Utils.Tests.Extensions
|
|||||||
Assert.AreEqual(typeof(IEnumerable), interfaces[0]);
|
Assert.AreEqual(typeof(IEnumerable), interfaces[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void GetMinimalInterfacesTest()
|
||||||
|
{
|
||||||
|
Assert.Inconclusive();
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestCase(typeof(int), "Int32")]
|
||||||
|
[TestCase(typeof(List<int>), "List")]
|
||||||
|
public void GetNameWithoutGenericArityTest(Type type, string expected)
|
||||||
|
{
|
||||||
|
Assert.AreEqual(expected, type.GetNameWithoutGenericArity());
|
||||||
|
}
|
||||||
|
|
||||||
|
[TestCase(typeof(string), "string")]
|
||||||
|
[TestCase(typeof(int?), "int?")]
|
||||||
|
[TestCase(typeof(List<int?>), "List<int?>")]
|
||||||
|
public void GetSyntaxNameTest(Type type, string expected)
|
||||||
|
{
|
||||||
|
Assert.AreEqual(expected, type.GetSyntaxName());
|
||||||
|
}
|
||||||
|
|
||||||
private interface C
|
private interface C
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user