public void MemberNameValidatorSelector_returns_true_when_property_name_matches() { var selector = new MemberNameValidatorSelector(new[] { "SomeProperty" }); var rule = CreateRule(x => x.SomeProperty); selector.CanExecute(rule, "SomeProperty").ShouldBeTrue(); }
public void MemberNameValidatorSelector_returns_false_when_property_name_does_not_match() { var selector = new MemberNameValidatorSelector(new[] { "SomeProperty" }); var rule = CreateRule(x => x.SomeOtherProperty); selector.CanExecute(rule, "SomeOtherProperty").ShouldBeFalse(); }