Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 3
0
        public void ComparisonConditionElementEqualsTrue()
        {
            bool result = new ComparisonConditionElement(null, "a", "==", "a").Evaluate(null);

            Assert.IsTrue(result);
        }
Ejemplo n.º 4
0
        public void ComparisonConditionElementEqualsNullFalseReverse()
        {
            bool result = new ComparisonConditionElement(null, "a", "==", null).Evaluate(null);

            Assert.IsFalse(result);
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
            }
        }