Пример #1
0
        public void AlterationTest()
        {
            // Create inital combination
            ExpressionText expression = _expression1.Combine(_expression2, ExpressionOperator.Plus) as ExpressionText;

            Assert.AreEqual(expression.Result, "12");

            // Alter combined object
            _expression2 = _expression2.Combine(_expression3, ExpressionOperator.Plus) as ExpressionText;
            Assert.AreEqual(expression.Result, "12");
        }
Пример #2
0
        public void PlusTest()
        {
            ExpressionText expression = _expression1.Combine(_expression2, ExpressionOperator.Plus) as ExpressionText;

            // 1 + 2
            Assert.AreEqual(expression.Result, "12");

            expression = expression.Combine(_expression3, ExpressionOperator.Plus) as ExpressionText;

            // 1 + 2 + 3
            Assert.AreEqual(expression.Result, "123");
        }