Example #1
0
        public void IncBoolTest()
        {
            var parameters = new ParameterCollection() { new Parameter("x", true) };
            var inc = new Inc(new Variable("x"));

            Assert.Throws<NotSupportedException>(() => inc.Execute(parameters));
        }
Example #2
0
        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"]);
        }
Example #3
0
 public void DecBoolTest()
 {
     var parameters = new ParameterCollection() { new Parameter("x", true) };
     var dec = new Inc(new Variable("x"));
     dec.Calculate(parameters);
 }