public void Evaluate_NumberOperand_ReturnsNumber() { var operand = new Number(1.5); var expression = new Plus(operand); var result = expression.EvaluateWithData(); Assert.AreEqual(1.5, result); }
public void Evaluate_IntegerOperand_ReturnsInteger() { var operand = new Integer(3); var expression = new Plus(operand); var result = expression.EvaluateWithData(); Assert.AreEqual(3, result); }
public void Evaluate_BooleanOperand_ThrowsInvalidOperationException() { var operand = new Text("Not a Number"); var expression = new Plus(operand); Assert.Throws <InvalidOperationException>(() => { expression.EvaluateWithData(); }); }