public void InvalidNotEnabled() { var model = new IsEnabledModel(); var validationContext = new ValidationContext(model); validationContext.ValidateObject(); }
public void ValidNotEnabled() { var model = new IsEnabledModel { String = "Hi" }; var validationContext = new ValidationContext(model); validationContext.ValidateObject(); }
public void InvalidIsEnabled() { var model = new IsEnabledModel { IsEnabled = true }; Assert.Throws <AggregateException>(() => { var validationContext = new ValidationContext(model); validationContext.ValidateObject(); }); }