Catel.Test.MVVM.CompositeCommandFacts.TheUnregisterGenericActionMethod.UnregistersCommandForExecution C# (CSharp) Метод

UnregistersCommandForExecution() приватный Метод

private UnregistersCommandForExecution ( ) : void
Результат 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