示例#1
0
        public void TestPrintIncompleteMultiply()
        {
            BinaryOperator multiplyOperation = new MultiplicationOperator();

            multiplyOperation.SetFirstOperand(new Value(1));
            Assert.AreEqual("1 × ".Replace(" ", ""), multiplyOperation.ToString().Replace(" ", ""));
        }
示例#2
0
        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(" ", ""));
        }