public void Rules_not_invoked_when_inverse_shared_condition_does_not_match() { var validator = new SharedConditionInverseValidator(); var result = validator.Validate(new Person()); result.IsValid.ShouldBeTrue(); }
public void Rules_invoke_when_inverse_shared_condition_matches() { var validator = new SharedConditionInverseValidator(); var result = validator.Validate(new Person { Id = 1 }); result.IsValid.ShouldBeFalse(); }