コード例 #1
0
        public void CustomValidation_Illegal_SuperType_Reference_Type_Fails()
        {
            CustomValidationAttribute cva      = new CustomValidationAttribute(typeof(MockValidator), "IsValidRefType");
            BaseBaseRefType           instance = new BaseBaseRefType();
            ValidationContext         context  = new ValidationContext(instance, null, null);

            Assert.IsNotNull(cva.GetValidationResult(instance, context));
        }
 public void CustomValidation_Illegal_SuperType_Reference_Type_Fails() {
     CustomValidationAttribute cva = new CustomValidationAttribute(typeof(MockValidator), "IsValidRefType");
     BaseBaseRefType instance = new BaseBaseRefType();
     ValidationContext context = new ValidationContext(instance, null, null);
     Assert.IsNotNull(cva.GetValidationResult(instance, context));
 }