public void ShouldBeReturnedFalseWhenEvaluateLessOrEqualConstraintAndValueIsADateGreaterThanConstraint()
        {
            var data       = ObjectHelper.ToDictionary(new { Deadline = DateTime.Today.AddDays(1) });
            var constraint = new LessOrEqualConstraint("Deadline", DateTime.Today);
            var result     = constraint.Evaluate(data);

            Assert.False(result);
        }
        public void ShouldBeReturnedFalseWhenEvaluateLessOrEqualConstraintAndPropertyNotExists()
        {
            var data       = ObjectHelper.ToDictionary(new { });
            var constraint = new LessOrEqualConstraint("Age", 18);
            var result     = constraint.Evaluate(data);

            Assert.False(result);
        }
        public void ShouldBeReturnedTrueWhenEvaluateLessOrEqualConstraintAndValueIsEqualsToConstraint()
        {
            var data       = ObjectHelper.ToDictionary(new { Age = 18 });
            var constraint = new LessOrEqualConstraint("Age", 18);
            var result     = constraint.Evaluate(data);

            Assert.True(result);
        }
        public void ShouldBeReturnedFalseWhenEvaluateLessOrEqualConstraintAndValueIsGreaterThanConstraint()
        {
            var data       = ObjectHelper.ToDictionary(new { Age = 20 });
            var constraint = new LessOrEqualConstraint("Age", 18);
            var result     = constraint.Evaluate(data);

            Assert.False(result);
        }
 public void TestSetup()
 {
     constraint = new LessOrEqualConstraint <TestConfig, int>(c => c.Field1, c => c.Field2);
     config     = new TestConfig();
 }