mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 12:07:05 +00:00
test: Updating TypeExtensionsTest
This commit is contained in:
parent
4df2ede630
commit
f2d32fd355
1 changed files with 27 additions and 0 deletions
|
|
@ -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
|
||||
{
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue