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); } }
public void ComparisonConditionElementGreaterThanOrEqualTrue() { using(new CultureContext(new CultureInfo("en-US"))) { bool result = new ComparisonConditionElement(null, "1", ">=", "1.000000").Evaluate(x => x); Assert.IsTrue(result); } }
public void ComparisonConditionElementEqualsTrue() { bool result = new ComparisonConditionElement(null, "a", "==", "a").Evaluate(null); Assert.IsTrue(result); }
public void ComparisonConditionElementEqualsNullFalseReverse() { bool result = new ComparisonConditionElement(null, "a", "==", null).Evaluate(null); Assert.IsFalse(result); }
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); }
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); } }
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); } }