Ejemplo n.º 1
0
        public void CalculateGreaterFalseTest()
        {
            var parameters = new ParameterCollection() { new Parameter("x", 0) };
            var lessThen = new GreaterThan(new Variable("x"), new Number(10));

            Assert.AreEqual(false, lessThen.Calculate(parameters));
        }
Ejemplo n.º 2
0
        public void CalculateGreaterTrueTest()
        {
            var parameters = new ParameterCollection() { new Parameter("x", 463) };
            var greaterThen = new GreaterThan(new Variable("x"), new Number(10));

            Assert.AreEqual(true, greaterThen.Calculate(parameters));
        }
Ejemplo n.º 3
0
        public void CalculateOrTrueTest2()
        {
            var parameters = new ParameterCollection() { new Parameter("x", 0) };
            var lessThen = new LessThan(new Variable("x"), new Number(-10));
            var greaterThen = new GreaterThan(new Variable("x"), new Number(-10));
            var or = new Or(lessThen, greaterThen);

            Assert.AreEqual(true, or.Calculate(parameters));
        }
Ejemplo n.º 4
0
        public void CalculateAndTrueTest()
        {
            var parameters = new ParameterCollection() { new Parameter("x", 0) };
            var lessThen = new LessThan(new Variable("x"), new Number(10));
            var greaterThen = new GreaterThan(new Variable("x"), new Number(-10));
            var and = new And(lessThen, greaterThen);

            Assert.AreEqual(true, and.Calculate(parameters));
        }