public void ShouldNotBePossibleEvaluateRuleWithIsTodayConstraintWhenPropertyIsNotADate() { var data = new { Birthday = 10 }; var constraint = new IsTodayConstraint("Birthday"); var result = constraint.Evaluate(ObjectHelper.ToDictionary(data)); Assert.False(result); }
public void ShouldNotBePossibleEvaluateRuleWithIsTodayConstraintWhenDateIsNotToday() { var data = new { Birthday = DateTime.Now.AddDays(-10) }; var constraint = new IsTodayConstraint("Birthday"); var result = constraint.Evaluate(ObjectHelper.ToDictionary(data)); Assert.False(result); }