public void ActionCommand_ExecuteInvokeAction_WhenActionParameterIsNotNull()
        {
            bool invoked = false;

            Action<object> action = obj => invoked = true;

            var command = new ActionCommand(action);
            command.Execute(null);

            Assert.IsTrue(invoked);
        }
        public void ActionCommand_ExecuteOverloadInvokeAction_WhenParameterIsNotNull()
        {
            bool invoked = false;

            Action<object> action = obj =>
            {
                Assert.IsNotNull(obj);
                invoked = true;
            };

            var command = new ActionCommand(action);
            command.Execute(new object());

            Assert.IsTrue(invoked);
        }
        public void ActionCommand_CanExecuteOverloadExecute_WhenPredicateisFalse()
        {
            var command = new ActionCommand(obj => { }, obj => (int)obj == 1);

            Assert.IsFalse(command.CanExecute(2));
        }
        public void ActionCommand_CanExecuteIsTrue_TruePredicateIsNull()
        {
            var command = new ActionCommand(obj => { });

            Assert.IsTrue(command.CanExecute(null));
        }
 public void ActionCommand_ConstructorThrowsException_WhenActionParameterIsNull()
 {
     var actionCommand = new ActionCommand(null);
 }