public static void Can_get_and_set_ErrorMessageResourceName() { var attribute = new ValidationAttributeNoOverrides(); Assert.Null(attribute.ErrorMessageResourceName); attribute.ErrorMessageResourceName = "SomeErrorMessageResourceName"; Assert.Equal("SomeErrorMessageResourceName", attribute.ErrorMessageResourceName); }
public static void Can_get_and_set_ErrorMessageResourceType() { var attribute = new ValidationAttributeNoOverrides(); Assert.Null(attribute.ErrorMessageResourceType); attribute.ErrorMessageResourceType = typeof(string); Assert.Equal(typeof(string), attribute.ErrorMessageResourceType); }
public static void TestThrowIfNoOverrideIsValid02() { var attribute = new ValidationAttributeNoOverrides(); Assert.Throws <NotImplementedException>( () => attribute.Validate("Object to validate does not matter - no override of IsValid", s_testValidationContext)); }
public static void TestThrowIfNoOverrideIsValid() { var attribute = new ValidationAttributeNoOverrides(); Assert.Throws <NotImplementedException>( () => attribute.IsValid("Does not matter - no override of IsValid")); }
public static void TestThrowIfNoOverrideIsValid01() { var attribute = new ValidationAttributeNoOverrides(); Assert.Throws<NotImplementedException>( () => attribute.Validate( "Object to validate does not matter - no override of IsValid", "Name to put in error message does not matter either")); }
public static void TestThrowIfNoOverrideIsValid01() { var attribute = new ValidationAttributeNoOverrides(); Assert.Throws <NotImplementedException>( () => attribute.Validate( "Object to validate does not matter - no override of IsValid", "Name to put in error message does not matter either")); }
public static void TestThrowIfNoOverrideIsValid02() { var attribute = new ValidationAttributeNoOverrides(); Assert.Throws<NotImplementedException>( () => attribute.Validate("Object to validate does not matter - no override of IsValid", s_testValidationContext)); }
public static void TestThrowIfNoOverrideIsValid() { var attribute = new ValidationAttributeNoOverrides(); Assert.Throws<NotImplementedException>( () => attribute.IsValid("Does not matter - no override of IsValid")); }
public static void Default_value_of_RequiresValidationContext_is_false() { var attribute = new ValidationAttributeNoOverrides(); Assert.False(attribute.RequiresValidationContext); }