public void ShouldNotBePossibleEvaluateRuleWithBetweenConstraintWhenPropertyHasOtherType() { var data = ObjectHelper.ToDictionary(new { Age = "Older" }); var constraint = new BetweenConstraint("Age", 12, 18); Assert.False(constraint.Evaluate(data)); }
public void ShouldNotBePossibleEvaluateRuleWithBetweenConstraintAndPropertyMissing() { var data = ObjectHelper.ToDictionary(new { }); var constraint = new BetweenConstraint("Age", 12, 18); Assert.False(constraint.Evaluate(data)); }
public void ShouldNotBePossibleEvaluateRuleWithBetweenConstraintWhenPropertyIsNull() { var data = ObjectHelper.ToDictionary(new { Age = (int?)null }); var constraint = new BetweenConstraint("Age", 12, 18); Assert.False(constraint.Evaluate(data)); }
public void ShouldNotBePossibleEvaluateRuleWithBetweenConstraintAndValueOutOfRange() { var data = ObjectHelper.ToDictionary(new { Age = 19 }); var constraint = new BetweenConstraint("Age", 12, 18); Assert.False(constraint.Evaluate(data)); }