public static void GetDataTypeName_and_Validate_successful_for_all_non_custom_DataTypes() { foreach (var enumValue in Enum.GetValues(typeof(DataType))) { var dataType = (DataType)enumValue; if (DataType.Custom != dataType) { var attribute = new DataTypeAttribute(dataType); Assert.Equal(Enum.GetName(typeof(DataType), enumValue), attribute.GetDataTypeName()); AssertEx.DoesNotThrow(() => attribute.Validate(new object(), s_testValidationContext)); } } }
public static void Constructor_NonNull_OtherProperty() { AssertEx.DoesNotThrow(() => new CompareAttribute("OtherProperty")); }