Example #1
0
 public void EntityWithPropertyRequirementsNotMetButCustomValidationRulesMetMustBeInvalid()
 {
     CustomValidateEntity entity = new CustomValidateEntity();
     entity.Name = "TestEntity";
     bool result = entity.IsValid;
     Assert.IsFalse(result);
 }
Example #2
0
 public void EntityWithCustomValidationRulesNotMetMustBeInvalid()
 {
     CustomValidateEntity entity = new CustomValidateEntity();
     entity.Number = 1;
     entity.Name = "Just another entity";
     bool result = entity.IsValid;
     Assert.IsFalse(result);
 }
Example #3
0
 public void EntityWithCustomValidationRulesMetMustBeValid()
 {
     CustomValidateEntity entity = new CustomValidateEntity();
     entity.Number = 1;
     entity.Name = "TestEntity";
     bool result = entity.IsValid;
     Assert.IsTrue(result);
 }