public void TestPrintIncompleteMultiply() { BinaryOperator multiplyOperation = new MultiplicationOperator(); multiplyOperation.SetFirstOperand(new Value(1)); Assert.AreEqual("1 × ".Replace(" ", ""), multiplyOperation.ToString().Replace(" ", "")); }
public void TestPrintMultiplicationExpression() { BinaryOperator multiplicationOperation = new MultiplicationOperator(); multiplicationOperation.SetFirstOperand(new Value(2.9M)); multiplicationOperation.SetSecondOperand(new Value(3)); Assert.AreEqual("2.9 × 3".Replace(" ", ""), multiplicationOperation.ToString().Replace(" ", "")); }