public void CanExecuteSimpleAction()
		{
			DslExecuter executer = new DslExecuter();
			executer.AddParameter("book", new DemoBook());
			object result = executer.Invoke(new ActionExpression("book", "pageTo", "51"));
			Assert.Equal(51, result);
		}
Exemple #2
0
        public void CanExecuteSimpleAction()
        {
            DslExecuter executer = new DslExecuter();

            executer.AddParameter("book", new DemoBook());
            object result = executer.Invoke(new ActionExpression("book", "pageTo", "51"));

            Assert.Equal(51, result);
        }
Exemple #3
0
        public void Execute()
        {
            bool result = true;

            foreach (ActionExpression expression in parsed.When)
            {
                bool clauseResult = (bool)this.executer.Invoke(expression);
                result &= clauseResult;
            }

            if (result)
            {
                foreach (ActionExpression expression in parsed.Then)
                {
                    executer.Invoke(expression);
                }
            }
        }