Пример #1
0
        public void TypeExtensions_ActualType_NullableType_ReturnsNonNullableType()
        {
            /* Test the method using a nullable value type */
            Type subject = typeof(int?);
            Type result  = subject.ActualType();

            Assert.AreEqual(typeof(int), result);
        }
Пример #2
0
        public void TypeExtensions_ActualType_ReferenceType_ReturnsSameType()
        {
            /* Test the method using a reference type */
            Type subject = typeof(string);
            Type result  = subject.ActualType();

            Assert.AreEqual(typeof(string), result);
        }
Пример #3
0
 public void TypeExtensions_ActualType_NullValue_ThrowsException()
 {
     /* Test the method using a reference type */
     Type subject = null;
     Type result  = subject.ActualType();
 }