示例#1
0
        public void ComparisonConditionElementGreaterThanFalse()
        {
            using (new CultureContext(new CultureInfo("en-US")))
            {
                bool result = new ComparisonConditionElement(null, "1.35555", ">", "1.35555").Evaluate(x => x);

                Assert.IsFalse(result);
            }
        }
示例#2
0
        public void ComparisonConditionElementGreaterThanOrEqualTrue()
        {
            using(new CultureContext(new CultureInfo("en-US")))
            {
                bool result = new ComparisonConditionElement(null, "1", ">=", "1.000000").Evaluate(x => x);

                Assert.IsTrue(result);
            }
        }
示例#3
0
        public void ComparisonConditionElementEqualsTrue()
        {
            bool result = new ComparisonConditionElement(null, "a", "==", "a").Evaluate(null);

            Assert.IsTrue(result);
        }
示例#4
0
        public void ComparisonConditionElementEqualsNullFalseReverse()
        {
            bool result = new ComparisonConditionElement(null, "a", "==", null).Evaluate(null);

            Assert.IsFalse(result);
        }
示例#5
0
 public void CompareBooleanToInt()
 {
     //Since the language is loosely typed, this will be compared as strings.
     bool result = new ComparisonConditionElement(null, "true", "==", "1").Evaluate(x => x);
     Assert.IsFalse(result);
 }
示例#6
0
        public void ComparisonConditionElementLessThanTrue()
        {
            using (new CultureContext(new CultureInfo("en-US")))
            {
                bool result = new ComparisonConditionElement(null, "1.35555", "<", "1.445").Evaluate(x => x);

                Assert.IsTrue(result);
            }
        }
示例#7
0
        public void ComparisonConditionElementLessThanOrEqualFalseLess()
        {
            using (new CultureContext(new CultureInfo("en-US")))
            {
                bool result = new ComparisonConditionElement(null, "1.1", "<=", "1.000000").Evaluate(x => x);

                Assert.IsFalse(result);
            }
        }