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

                Assert.AreEqual(TaskStatus.Failure, task.Update());
            }
Beispiel #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);
            }
Beispiel #3
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);
            }
Beispiel #4
0
            public void It_should_not_fail_without_a_generic_function()
            {
                var task = new ActionGeneric();

                task.Update();
            }