public static void TestExecuteWhenNotCanExecute()
        {
            int result = 0;
            DelegateAction <int> action = new DelegateAction <int>((i) => result = i + i, (i) => i == result);

            Assert.That(action.CanExecute(0), Is.True);
            Assert.Throws <InvalidOperationException>(() => action.Execute(5));
        }
        public static void TestExecute()
        {
            int result = 0;
            DelegateAction <int> action = new DelegateAction <int>((i) => result = i + i, (i) => i == result);

            result = 5;
            action.Execute(5);

            Assert.That(result, Is.EqualTo(10));
        }
        public static void TestExecuteWithNoConditionForCanExecute()
        {
            int result = 0;
            DelegateAction <int> action = new DelegateAction <int>((i) => result = i + i);

            Assert.That(action.CanExecute(0), Is.True);
            Assert.That(action.CanExecute(1), Is.True);

            result = 5;
            action.Execute(5);

            Assert.That(result, Is.EqualTo(10));
        }
 public override void Execute(StateMachineActionObject smao)
 {
     Action.Execute(smao);
 }