public void ValidationTest_NotMatch_OtherType() { Person2 person = new Person2() { IsCouple = "No" }; var validateResult = person.Validate(); Assert.IsFalse(validateResult.Any()); }
public void ValidationTest_Match_OtherType() { Person2 person = new Person2() { IsCouple = "Yes" }; var validateResult = person.Validate(); Assert.AreEqual(1, validateResult.Count()); Assert.AreEqual(Person.CoupleNameErrorMessage, validateResult.Single().ErrorMessage); }