Esempio n. 1
0
        public void MultiplyTwoIntegers()
        {
            MultiplyExpression expr = new MultiplyExpression(new ConstantExpression(3), new ConstantExpression(2));

            Assert.AreEqual(6, expr.Evaluate(null));
            Assert.IsFalse(expr.HasVariable());
        }
Esempio n. 2
0
        public void MultiplyIntegerByDouble()
        {
            MultiplyExpression expr = new MultiplyExpression(new ConstantExpression(2), new ConstantExpression(2.5));

            Assert.AreEqual(2 * 2.5, expr.Evaluate(null));
        }
Esempio n. 3
0
        public void MultiplyTwoDoubles()
        {
            MultiplyExpression expr = new MultiplyExpression(new ConstantExpression(2.5), new ConstantExpression(3.7));

            Assert.AreEqual(2.5 * 3.7, expr.Evaluate(null));
        }
Esempio n. 4
0
        public void MultiplyDoubleByInteger()
        {
            MultiplyExpression expr = new MultiplyExpression(new ConstantExpression(2.5), new ConstantExpression(3));

            Assert.AreEqual(2.5 * 3, expr.Evaluate(null));
        }