public void IfSimpleExpressionNotCorrectThenException() { string exp = "256 # (-2)"; Parser target = new Parser(mathOperations.Object); target.ParseSimpleExp(exp); }
public void IsParseSimleExpressionCorrect() { string exp = "256 * (-2)"; Parser target = new Parser(mathOperations.Object); OperationInfo result = target.ParseSimpleExp(exp); Assert.AreEqual(result.OperandLeft, 256); Assert.AreEqual(result.OperandRight, -2); Assert.AreEqual(result.OperationSymbol, '*'); }