public void TestIsValidSinglePropertySucceeds() { var sut = new BaseDtoImplementation1 { RequiredStringProperty1 = "arbitrary-value" }; var isValidProperty1 = sut.IsValid("RequiredStringProperty1"); Assert.IsTrue(isValidProperty1); var isValidProperty2 = sut.IsValid("RequiredStringProperty2"); Assert.IsFalse(isValidProperty2); var isValidClass = sut.IsValid(); Assert.IsFalse(isValidClass); }
public void TestIsValidSinglePropertyAndValueSucceeds() { var sut = new BaseDtoImplementation1 { RequiredStringProperty1 = "arbitrary-value" }; var isValidProperty2 = sut.IsValid("RequiredStringProperty2", null); Assert.IsFalse(isValidProperty2); }