public bool CanExecute(object parameter) { return (_executeAction != null && _canExecuteFunction != null && _canExecuteFunction()); }
public void No_Execution() { var executed = false; var command = new ActionCommand(() => executed = true, () => false, false); var canExecute = command.CanExecute(null); Assert.IsFalse(canExecute); command.Execute(null); Assert.IsFalse(executed); var obj = new Object(); canExecute = command.CanExecute(obj); Assert.IsFalse(canExecute); command.Execute(obj); Assert.IsFalse(executed); }