public void IsValidForEverything() { Person person = new Person(); Assert.IsFalse(runner.IsValid(person)); person = new Person(1, 27, "hammett", "100, street"); Assert.IsTrue(runner.IsValid(person)); }
public void SummaryBasicFunctionality() { Person person = new Person(); Assert.IsFalse(runner.IsValid(person)); Assert.IsTrue(runner.HasErrors(person)); ErrorSummary errorSummary = runner.GetErrorSummary(person); Assert.IsNotNull(errorSummary); Assert.AreEqual(2, errorSummary.ErrorsCount); Assert.AreEqual(2, errorSummary.InvalidPropertiesCount); }