public void CanExecuteReturnsTrueWithoutCanExecuteDelegate() { var handlers = new DelegateHandlers(); var command = new DelegateCommand <object>(handlers.Execute); bool retValue = command.CanExecute(null); Assert.True(retValue); }
public void CanExecuteReturnsTrueWithouthCanExecuteDelegate() { var handlers = new DelegateHandlers(); var command = new DelegateCommand<object>(handlers.Execute); bool retVal = command.CanExecute(null); Assert.AreEqual(true, retVal); }
public void ExecuteCallsPassedInExecuteDelegate() { var handlers = new DelegateHandlers(); var command = new DelegateCommand <object>(handlers.Execute); object parameter = new(); command.Execute(parameter); Assert.Same(parameter, handlers.ExecuteParameter); }
public void CanExecuteReturnsTrueWithouthCanExecuteDelegate() { var handlers = new DelegateHandlers(); var command = new DelegateCommand <object>(handlers.Execute); bool retVal = command.CanExecute(null); Assert.AreEqual(true, retVal); }
public async Task ExecuteCallsPassedInExecuteDelegate() { var handlers = new DelegateHandlers(); var command = new DelegateCommand<object>(handlers.Execute); object parameter = new object(); await command.Execute(parameter); Assert.AreSame(parameter, handlers.ExecuteParameter); }
public void ExecuteCallsPassedInExecuteDelegate() { var handlers = new DelegateHandlers(); var command = new DelegateCommand<object>(handlers.Execute, null); object parameter = new object(); command.Execute(parameter); Assert.AreSame(parameter, handlers.ExecuteParameter); }
public async Task ExecuteCallsPassedInExecuteDelegate() { var handlers = new DelegateHandlers(); var command = new DelegateCommand <object>(handlers.Execute); object parameter = new object(); await command.Execute(parameter); Assert.Same(parameter, handlers.ExecuteParameter); }
public void RaiseCanExecuteChanged_RaisesCanExecuteChanged() { var handlers = new DelegateHandlers(); var command = new DelegateCommand <object>(handlers.Execute); bool canExecuteChanged = false; command.CanExecuteChanged += delegate { canExecuteChanged = true; }; command.RaiseCanExecuteChanged(); Assert.True(canExecuteChanged); }
public void RaiseCanExecuteChangedRaisesCanExecuteChanged() { var handlers = new DelegateHandlers(); var command = new DelegateCommand<object>(handlers.Execute); bool canExecuteChangedRaised = false; command.CanExecuteChanged += delegate { canExecuteChangedRaised = true; }; command.RaiseCanExecuteChanged(); Assert.IsTrue(canExecuteChangedRaised); }
public void CanExecuteCallsPassedInCanExecuteDelegate() { var handlers = new DelegateHandlers(); var command = new DelegateCommand <object>(handlers.Execute, handlers.CanExecute); object parameter = new object(); handlers.CanExecuteReturnValue = true; bool retVal = command.CanExecute(parameter); Assert.Same(parameter, handlers.CanExecuteParameter); Assert.Equal(handlers.CanExecuteReturnValue, retVal); }
public void CanExecuteCallsPassedInCanExecuteDelegate() { var handlers = new DelegateHandlers(); var command = new DelegateCommand<object>(handlers.Execute, handlers.CanExecute); object parameter = new object(); handlers.CanExecuteReturnValue = true; bool retVal = command.CanExecute(parameter); Assert.AreSame(parameter, handlers.CanExecuteParameter); Assert.AreEqual(handlers.CanExecuteReturnValue, retVal); }