Exemplo n.º 1
0
            public void It_should_execute_a_generic_function()
            {
                var task = new ActionGeneric {
                    updateLogic = () => TaskStatus.Failure
                };

                Assert.AreEqual(TaskStatus.Failure, task.Update());
            }
Exemplo n.º 2
0
            public void It_should_execute_a_exit_hook()
            {
                var test = 0;
                var task = new ActionGeneric {
                    exitLogic = () => { test++; }
                };

                task.Update();

                Assert.AreEqual(1, test);
            }
        public ActionSequenceGeneric <TData> Append(
            Action <TData> actionLogic,
            Func <TData, bool> checker          = null,
            Action <TData> actionTimeoutHandler = null,
            float timeout = 60)
        {
            var ac = new ActionGeneric(actionLogic, checker, timeout, actionTimeoutHandler, _data);

            Append(ac);

            return(this);
        }
Exemplo n.º 4
0
            public void It_should_execute_init_hook_on_continue()
            {
                var test = 0;
                var task = new ActionGeneric {
                    initLogic   = () => { test++; },
                    updateLogic = () => TaskStatus.Continue,
                };

                task.Update();

                Assert.AreEqual(1, test);
            }
Exemplo n.º 5
0
            public void It_should_not_fail_without_a_generic_function()
            {
                var task = new ActionGeneric();

                task.Update();
            }