public void IncBoolTest() { var parameters = new ParameterCollection() { new Parameter("x", true) }; var inc = new Inc(new Variable("x")); Assert.Throws<NotSupportedException>(() => inc.Execute(parameters)); }
public void IncCalcTest() { var parameters = new ParameterCollection() { new Parameter("x", 10) }; var inc = new Inc(new Variable("x")); var result = (double)inc.Calculate(parameters); Assert.AreEqual(11.0, result); Assert.AreEqual(11.0, parameters["x"]); }
public void DecBoolTest() { var parameters = new ParameterCollection() { new Parameter("x", true) }; var dec = new Inc(new Variable("x")); dec.Calculate(parameters); }