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"); }
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"); }