public void ValidateObject_IValidatableObject_Null() { var instance = new ValidatableNull(); var context = new ValidationContext(instance); Validator.ValidateObject(instance, context); }
public void TryValidateObject_IValidatableObject_Null() { var instance = new ValidatableNull(); var context = new ValidationContext(instance); var results = new List <ValidationResult>(); Assert.True(Validator.TryValidateObject(instance, context, results)); Assert.Equal(0, results.Count); }