public void GetTypeCodeReturnsExpectedCodeForAllBuiltInTypes() { foreach (TypeCode code in Enum.GetValues(typeof(TypeCode))) { if (code == TypeCode.Empty) { continue; } Type associatedType = Type.GetType("System." + code); Assert.AreEqual(code, ReflectorTypeUtils.GetTypeCode(Reflector.Wrap(associatedType))); } }
public void GetTypeCodeReturnsObjectByDefault() { Assert.AreEqual(TypeCode.Object, ReflectorTypeUtils.GetTypeCode(Reflector.Wrap(GetType()))); }
public void GetTypeCodeReturnsEmptyIfTypeIsNull() { Assert.AreEqual(TypeCode.Empty, ReflectorTypeUtils.GetTypeCode(null)); }