public void ExecuteCancelCommandShouldExecuteExpectedCommand() { // arrange var command = new Mock<INamedCommand>(); command.Setup( c => c.CanExecute( It.IsAny<object>() ) ).Returns( true ); command.Setup( c => c.Execute( It.IsAny<object>() ) ); var interaction = new Interaction() { CancelCommandIndex = 0, Commands = { command.Object } }; // act interaction.ExecuteCancelCommand(); // assert command.Verify( c => c.Execute( null ), Times.Once() ); }