Esempio n. 1
0
        public void ResultTypeBoolVarTest()
        {
            var exp = new Or(new Bool(true), new Variable("x"));

            Assert.Equal(ExpressionResultType.Boolean, exp.ResultType);
        }
Esempio n. 2
0
        public void ResultTypeNumberNumberTest()
        {
            var exp = new Or(new Number(2), new Number(4));

            Assert.Equal(ExpressionResultType.Number, exp.ResultType);
        }
Esempio n. 3
0
        public void ExecuteTest4()
        {
            var exp = new Or(new Bool(false), new Bool(false));

            Assert.Equal(false, exp.Execute());
        }
Esempio n. 4
0
        public void ResultTypeBoolBoolTest()
        {
            var exp = new Or(new Bool(true), new Bool(false));

            Assert.Equal(ExpressionResultType.Boolean, exp.ResultType);
        }
Esempio n. 5
0
        public void ExecuteTest1()
        {
            var exp = new Or(new Number(1), new Number(2));

            Assert.Equal(3.0, exp.Execute());
        }
Esempio n. 6
0
        public void ExecuteTest2()
        {
            var exp = new Or(new Number(4), new Number(2.5));

            Assert.Equal(7.0, exp.Execute());
        }
Esempio n. 7
0
        public void ResultTypeVerVarTest()
        {
            var exp = new Or(new Variable("y"), new Variable("x"));

            Assert.Equal(ExpressionResultType.Number | ExpressionResultType.Boolean, exp.ResultType);
        }
Esempio n. 8
0
        public void ResultTypeVarNumTest()
        {
            var exp = new Or(new Variable("x"), new Number(1));

            Assert.Equal(ExpressionResultType.Number, exp.ResultType);
        }
Esempio n. 9
0
        public void CalculateTest4()
        {
            var exp = new Or(new Bool(false), new Bool(false));

            Assert.AreEqual(false, exp.Calculate());
        }
Esempio n. 10
0
        public void CalculateTest2()
        {
            IExpression exp = new Or(new Number(4), new Number(2.5));

            Assert.AreEqual(7, exp.Calculate());
        }
Esempio n. 11
0
        public void CalculateTest1()
        {
            IExpression exp = new Or(new Number(1), new Number(2));

            Assert.AreEqual(3, exp.Calculate());
        }