Catel.Test.MVVM.CompositeCommandFacts.TheUnregisterGenericActionMethod.UnregistersCommandForExecution C# (CSharp) Method

UnregistersCommandForExecution() private method

private UnregistersCommandForExecution ( ) : void
return void
            public void UnregistersCommandForExecution()
            {
                var compositeCommand = new CompositeCommand();

                bool executed = false;
                var action = new Action<object>(obj => executed = true);

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

                compositeCommand.Execute();

                Assert.IsFalse(executed);
            }
        }
CompositeCommandFacts.TheUnregisterGenericActionMethod