Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
 public void TypeExtensions_ActualType_NullValue_ThrowsException()
 {
     /* Test the method using a reference type */
     Type subject = null;
     Type result  = subject.ActualType();
 }