public void TestParameterizedCanExecuteInvalidParameter() { var command = new TestParameterizedCommand(); Assert.That(((ICommand)command).CanExecute(null), Is.False); Assert.That(((ICommand)command).CanExecute("happy"), Is.False); }
public void TestParameterizedExecuteICommand() { var command = new TestParameterizedCommand(); Assert.That(command.ExecuteParameter, Is.EqualTo(0)); ((ICommand)command).Execute(4); Assert.That(command.ExecuteParameter, Is.EqualTo(4)); }
public void TestParameterizedCanExecuteChanged() { var eventRaised = false; var command = new TestParameterizedCommand(); command.CanExecuteChanged += (o, e) => eventRaised = true; command.RaiseCanExecuteChanged(); Assert.That(eventRaised, Is.True); }
public void TestParameterizedCanExecute() { var command = new TestParameterizedCommand(); Assert.That(command.CanExecute(4), Is.True); Assert.That(command.CanExecute(7), Is.False); Assert.That(((ICommand)command).CanExecute(4), Is.True); Assert.That(((ICommand)command).CanExecute(7), Is.False); Assert.That(command.ExecuteParameter, Is.EqualTo(0)); }
public void TestParameterizedInheritance() { var command = new TestParameterizedCommand(); Assert.That(command, Is.InstanceOf <ICommand>()); }