public static void TestNoThrowIfOverrideIsValid01() { var attribute = new ValidationAttributeOverrideTwoArgsIsValid(); AssertEx.DoesNotThrow( () => attribute.Validate("Valid Value", "Name to put in error message does not matter - no error")); }
public static void TestReturnErrorMessageInIsValid() { var attribute = new ValidationAttributeOverrideTwoArgsIsValid(); var toBeTested = new ToBeTested(); var validationContext = new ValidationContext(toBeTested); validationContext.MemberName = "PropertyToBeTested"; var validationResult = attribute.GetValidationResult(toBeTested, validationContext); Assert.NotNull(validationResult); // validationResult == null would be success // cannot check error message - not defined on ret builds }
public static void TestNoThrowIfOverrideIsValid01() { var attribute = new ValidationAttributeOverrideTwoArgsIsValid(); attribute.Validate("Valid Value", "Name to put in error message does not matter - no error"); }
public static void TestReturnErrorMessageInIsValid() { var attribute = new ValidationAttributeOverrideTwoArgsIsValid(); var toBeTested = new ToBeTested(); var validationContext = new ValidationContext(toBeTested); validationContext.MemberName = "PropertyToBeTested"; var validationResult = attribute.GetValidationResult(toBeTested, validationContext); Assert.NotNull(validationResult); // validationResult == null would be success // cannot check error message - not defined on ret builds }
public static void TestTwoArgsIsValidValidatesSuccessfully() { var attribute = new ValidationAttributeOverrideTwoArgsIsValid(); attribute.GetValidationResult("Valid Value", s_testValidationContext); }
public static void TestNoThrowIfOverrideIsValid03() { var attribute = new ValidationAttributeOverrideTwoArgsIsValid(); attribute.Validate("Valid Value", s_testValidationContext); }
public static void TestTwoArgsIsValidValidatesSuccessfully() { var attribute = new ValidationAttributeOverrideTwoArgsIsValid(); AssertEx.DoesNotThrow(() => attribute.GetValidationResult("Valid Value", s_testValidationContext)); }
public static void TestNoThrowIfOverrideIsValid03() { var attribute = new ValidationAttributeOverrideTwoArgsIsValid(); AssertEx.DoesNotThrow(() => attribute.Validate("Valid Value", s_testValidationContext)); }
public static void TestTwoArgsIsValidValidatesSuccessfully() { var attribute = new ValidationAttributeOverrideTwoArgsIsValid(); AssertEx.DoesNotThrow(() => attribute.GetValidationResult("Valid Value", s_testValidationContext)); }
public static void TestNoThrowIfOverrideIsValid03() { var attribute = new ValidationAttributeOverrideTwoArgsIsValid(); AssertEx.DoesNotThrow(() => attribute.Validate("Valid Value", s_testValidationContext)); }
public static void TestTwoArgsIsValidValidatesSuccessfully() { var attribute = new ValidationAttributeOverrideTwoArgsIsValid(); attribute.GetValidationResult("Valid Value", s_testValidationContext); }
public static void TestNoThrowIfOverrideIsValid03() { var attribute = new ValidationAttributeOverrideTwoArgsIsValid(); attribute.Validate("Valid Value", s_testValidationContext); }