public UnregisterCommand ( string commandName, ICommand command ) : void | ||
commandName | string | Name of the command. |
command | ICommand | The command. |
return | void |
public void DoesNotExecuteUnregisteredCommands() { var vm = new CompositeCommandViewModel(); var commandManager = new CommandManager(); commandManager.CreateCommand("MyCommand"); commandManager.RegisterCommand("MyCommand", vm.TestCommand1); Assert.IsTrue(commandManager.IsCommandCreated("MyCommand")); commandManager.UnregisterCommand("MyCommand", vm.TestCommand1); commandManager.ExecuteCommand("MyCommand"); Assert.IsFalse(vm.IsTestCommand1Executed); }