public void IsClassType() { Assert.ThrowsExact <ArgumentNullException>(() => Assert.IsClassType(null as object)); Assert.ThrowsExact <ArgumentNullException>(() => Assert.IsClassType(null as Type)); Assert.DoesNotThrow(() => Assert.IsClassType("hello")); Assert.ThrowsExact <AssertionException>(() => Assert.IsClassType(1L)); Assert.ThrowsExact <AssertionException>(() => Assert.IsClassType(AttributeTargets.All)); Assert.DoesNotThrow(() => Assert.IsClassType(new List <int>())); Assert.DoesNotThrow(() => Assert.IsClassType(new int[0])); Assert.DoesNotThrow(() => Assert.IsClassType <string>()); Assert.ThrowsExact <AssertionException>(() => Assert.IsClassType <long>()); Assert.ThrowsExact <AssertionException>(() => Assert.IsClassType <AttributeTargets>()); Assert.DoesNotThrow(() => Assert.IsClassType <List <int> >()); Assert.DoesNotThrow(() => Assert.IsClassType <int[]>()); Assert.ThrowsExact <AssertionException>(() => Assert.IsClassType <IEnumerable <int> >()); Assert.DoesNotThrow(() => Assert.IsClassType(typeof(string))); Assert.ThrowsExact <AssertionException>(() => Assert.IsClassType(typeof(long))); Assert.ThrowsExact <AssertionException>(() => Assert.IsClassType(typeof(AttributeTargets))); Assert.DoesNotThrow(() => Assert.IsClassType(typeof(List <int>))); Assert.DoesNotThrow(() => Assert.IsClassType(typeof(int[]))); Assert.ThrowsExact <AssertionException>(() => Assert.IsClassType(typeof(IEnumerable <int>))); }