Skip to content

Commit 4ef3494

Browse files
committed
Adding Type.IsPrimitive() unit tests
1 parent 481db36 commit 4ef3494

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

NetStandardPolyfills.UnitTests/WhenCheckingTypeData.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@ public void ShouldFlagANonAnonymousType()
6666
typeof(IOrderedEnumerable<int>).IsAnonymous().ShouldBeFalse();
6767
}
6868

69+
[Fact]
70+
public void ShouldFlagAPrimitiveType()
71+
{
72+
typeof(int).IsPrimitive().ShouldBeTrue();
73+
}
74+
75+
[Fact]
76+
public void ShouldFlagANonPrimitiveType()
77+
{
78+
typeof(object).IsPrimitive().ShouldBeFalse();
79+
}
80+
6981
[MyAttribute]
7082
private class TestHelper
7183
{

0 commit comments

Comments
 (0)