public void ShouldBeReturnedFalseWhenEvaluateGreaterOrEqualConstraintAndPropertyNotExists() { var data = ObjectHelper.ToDictionary(new { }); var constraint = new GreaterOrEqualConstraint("Age", 18); var result = constraint.Evaluate(data); Assert.False(result); }
public void ShouldBeReturnedFalseWhenEvaluateGreaterOrEqualConstraintAndValueIsADateLessThanConstraint() { var data = ObjectHelper.ToDictionary(new { Deadline = DateTime.Today.AddDays(-1) }); var constraint = new GreaterOrEqualConstraint("Deadline", DateTime.Today); var result = constraint.Evaluate(data); Assert.False(result); }
public void ShouldBeReturnedFalseWhenEvaluateGreaterOrEqualConstraintAndValueIsLessThanConstraint() { var data = ObjectHelper.ToDictionary(new { Age = 17 }); var constraint = new GreaterOrEqualConstraint("Age", 18); var result = constraint.Evaluate(data); Assert.False(result); }