예제 #1
0
        void IValidationResultTester.ShouldNotHaveValidationError(IEnumerable <MemberInfo> properties)
        {
            var propertyName = properties.Any() ? GetPropertyName(properties) : ValidationTestExtension.MatchAnyFailure;

            ValidationTestExtension.ShouldNotHaveValidationError(Errors, propertyName);
        }
예제 #2
0
 public void ShouldNotHaveValidationErrorFor(string propertyName)
 {
     ValidationTestExtension.ShouldNotHaveValidationError(Errors, propertyName);
 }
예제 #3
0
        public void ShouldNotHaveValidationErrorFor <TProperty>(Expression <Func <T, TProperty> > memberAccessor)
        {
            string propertyName = ValidatorOptions.PropertyNameResolver(typeof(T), memberAccessor.GetMember(), memberAccessor);

            ValidationTestExtension.ShouldNotHaveValidationError(Errors, propertyName);
        }
예제 #4
0
 public IEnumerable <ValidationFailure> ShouldHaveValidationErrorFor(string propertyName)
 {
     return(ValidationTestExtension.ShouldHaveValidationError(Errors, propertyName));
 }
예제 #5
0
        public IEnumerable <ValidationFailure> ShouldHaveValidationErrorFor <TProperty>(Expression <Func <T, TProperty> > memberAccessor)
        {
            string propertyName = ValidatorOptions.PropertyNameResolver(typeof(T), memberAccessor.GetMember(), memberAccessor);

            return(ValidationTestExtension.ShouldHaveValidationError(Errors, propertyName));
        }