public void AddressNotNull() { var val = new AddressNotNullValidator(); var errors = val.Validate(new Person { Address = new Address() }); Assert.AreEqual(0, errors.Count); }
public void AddressNull() { var val = new AddressNotNullValidator(); var errors = val.Validate(new Person { Address = null }); Assert.AreEqual(1, errors.Count); Assert.AreEqual("Address not valid", errors[0]); }