예제 #1
0
        public void GetDefaultValueReturnsDefaultValueForAssociatedTypeCode()
        {
            foreach (TypeCode code in Enum.GetValues(typeof(TypeCode)))
            {
                if (code == TypeCode.Empty)
                {
                    continue;
                }

                Type associatedType = Type.GetType("System." + code);
                Assert.AreEqual(ReflectionUtils.GetDefaultValue(code), ReflectorTypeUtils.GetDefaultValue(Reflector.Wrap(associatedType)));
            }
        }
예제 #2
0
 public void GetDefaultValueReturnsNullIfTypeIsNull()
 {
     Assert.IsNull(ReflectorTypeUtils.GetDefaultValue(null));
 }