public void TestCase04_Validation_ThrowOnError_InvalidEntity() { TestDummy dummy = new TestDummy { TextValue = "zzzzabc12", NumericValue = 16, BooleanValue = null }; EntityValidator <TestDummy> validator = new EntityValidator <TestDummy>(); ICollection <ValidationResult> results = validator.PerformValidation(dummy, true); }
public void TestCase03_Validation_ThrowOnError_ValidEntity() { TestDummy dummy = new TestDummy { TextValue = "zzzzabc12", NumericValue = 11, BooleanValue = false }; EntityValidator <TestDummy> validator = new EntityValidator <TestDummy>(); ICollection <ValidationResult> results = validator.PerformValidation(dummy, true); Assert.IsNotNull(results); Assert.AreEqual(0, results.Count); }
public void TestCase02_Validation_InvalidEntity() { TestDummy dummy = new TestDummy { TextValue = "zzzzabc12", NumericValue = 16, BooleanValue = null }; EntityValidator <TestDummy> validator = new EntityValidator <TestDummy>(); ICollection <ValidationResult> results = validator.PerformValidation(dummy); Assert.IsNotNull(results); Assert.AreEqual(2, results.Count); }