Пример #1
0
        public void Test_ArithmeticCommands()
        {
            IParameterDic pm = new ParameterDic();
            int           val1 = 1; int val2 = 2;

            //Assert.IsTrue(runCommand(
            //    ScriptCommands.Assign(val1,
            //        ScriptCommands.Assign(val2,
            //          ScriptCommands.Add("{val1}", "{val2}", "{outputVal}"))), pm));
            Assert.IsTrue(runCommand(
                              ScriptCommands.AssignMulti(
                                  ScriptCommands.Add("{val1}", "{val2}", "{outputVal}"),
                                  () => val1,
                                  () => val2), pm));
            Assert.AreEqual(3, pm.Get("{outputVal}"));
        }