mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-01-11 19:44:55 +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());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetAssemblyTest()
|
||||
{
|
||||
Assert.Inconclusive();
|
||||
}
|
||||
|
||||
[TestCase(typeof(string), typeof(object), true)]
|
||||
[TestCase(typeof(object), typeof(string), false)]
|
||||
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]);
|
||||
}
|
||||
|
||||
[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
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user