Exemplo n.º 1
0
 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));
         }
     }
 }
Exemplo n.º 2
0
 public static void Constructor_NonNull_OtherProperty()
 {
     AssertEx.DoesNotThrow(() => new CompareAttribute("OtherProperty"));
 }