Exemple #1
0
        public void CustomValidation_Legal_Derived_Reference_Type()
        {
            CustomValidationAttribute cva      = new CustomValidationAttribute(typeof(MockValidator), "IsValidRefType");
            DerivedRefType            instance = new DerivedRefType();
            ValidationContext         context  = new ValidationContext(instance, null, null);

            Assert.IsNull(cva.GetValidationResult(instance, context));
        }
 public void CustomValidation_Legal_Derived_Reference_Type() {
     CustomValidationAttribute cva = new CustomValidationAttribute(typeof(MockValidator), "IsValidRefType");
     DerivedRefType instance = new DerivedRefType();
     ValidationContext context = new ValidationContext(instance, null, null);
     Assert.IsNull(cva.GetValidationResult(instance, context));
 }