public void Subtract_WithString3StringA_ThrowsRuntimeBinderException() { var variables = MakeVariables(); var left = new Constant("3"); var right = new Constant("A"); var expression = new Subtract(left, right); var actual = expression.GetExpression(variables) .Calculate(); }
public void Subtract_WithString3String2_ReturnsInteger1() { var variables = MakeVariables(); var left = new Constant("3"); var right = new Constant("2"); var expression = new Subtract(left, right); var actual = expression.GetExpression(variables) .Calculate(); Assert.AreEqual(1, actual); }
public void Subtract_WithDouble3Double2_ReturnsDouble1() { var variables = MakeVariables(); var left = new Constant(3.0); var right = new Constant(2.0); var expression = new Subtract(left, right); var actual = expression.GetExpression(variables) .Calculate(); Assert.AreEqual(1.0, actual); }