public void DecBoolTest() { var parameters = new ParameterCollection() { new Parameter("x", true) }; var dec = new Dec(Variable.X); Assert.Throws <NotSupportedException>(() => dec.Execute(parameters)); }
public void DecCalcTest() { var parameters = new ParameterCollection() { new Parameter("x", 10) }; var dec = new Dec(Variable.X); var result = (double)dec.Execute(parameters); Assert.Equal(9.0, result); Assert.Equal(9.0, parameters["x"]); }
public void NotVarTest() { var dec = new Dec(new Number(2)); Assert.Equal(1.0, dec.Execute()); }