Catel.Test.MVVM.CompositeCommandFacts.TheRegisterAndUnregisterActionFunctionality.RegisteredActionsCanBeUnregistered_DefinedAction C# (CSharp) Method

RegisteredActionsCanBeUnregistered_DefinedAction() private method

private RegisteredActionsCanBeUnregistered_DefinedAction ( ) : void
return void
            public void RegisteredActionsCanBeUnregistered_DefinedAction()
            {
                var invoked = false;
                Action action = () => invoked = true;

                var compositeCommand = new CompositeCommand();

                compositeCommand.RegisterAction(action);
                compositeCommand.UnregisterAction(action);

                compositeCommand.Execute(null);

                Assert.IsFalse(invoked);
            }