public void BoolSubNumberTest() { var parameters = new ParameterCollection() { new Parameter("x", true) }; var add = new SubAssign(Variable.X, new Number(2)); Assert.Throws <NotSupportedException>(() => add.Execute(parameters)); }
public void SubAssignCalc() { var parameters = new ParameterCollection() { new Parameter("x", 10) }; var sub = new SubAssign(Variable.X, new Number(2)); var result = sub.Execute(parameters); var expected = 8.0; Assert.Equal(expected, result); Assert.Equal(expected, parameters["x"]); }