public void ExecuteInvokesAction() { bool invoked = false; Action<object> action = x => invoked = true; RelayCommand command = new RelayCommand(action); command.Execute(null); Assert.IsTrue(invoked); }
public void ExecuteOverloadInvokesActionWithParameter() { bool invoked = false; Action<object> action = x => { Assert.IsNotNull(x); invoked = true; }; RelayCommand command = new RelayCommand(action); command.Execute(new object()); Assert.IsTrue(invoked); }