public void CanExecuteMultipleActionConditionTypes()
        {
            MockCondition1 ev1 = new MockCondition1();
            MockCondition2 ev2 = new MockCondition2();

            catalog.RegisterSpecificCondition("Action1", ev1);
            catalog.RegisterSpecificCondition("Action1", ev2);

            Assert.IsFalse(catalog.CanExecute("Action1"));
            Assert.IsTrue(ev1.Executed);
            Assert.IsTrue(ev2.Executed);
        }
        public void CanRemoveGlobalActionCondition()
        {
            MockCondition1 ev1 = new MockCondition1();
            MockCondition2 ev2 = new MockCondition2();

            catalog.RegisterGeneralCondition(ev1);
            catalog.RegisterGeneralCondition(ev2);
            catalog.RemoveGeneralCondition(ev2);

            Assert.IsTrue(catalog.CanExecute("Action1"));
            Assert.IsTrue(ev1.Executed);
            Assert.IsFalse(ev2.Executed);
        }
        public void ComplexPipelineTest()
        {
            MockCondition1 ev1 = new MockCondition1(); // return true
            MockCondition2 ev2 = new MockCondition2(); // return false
            MockCondition3 ev3 = new MockCondition3(); // return true
            MockCondition4 ev4 = new MockCondition4(); // return true

            catalog.RegisterGeneralCondition(ev1);
            catalog.RegisterSpecificCondition("Action1", ev3);
            catalog.RegisterSpecificCondition("Action2", ev2);
            catalog.RegisterGeneralCondition(ev4);

            Assert.IsTrue(catalog.CanExecute("Action1", null, null, null));  // ev1, ev3
            Assert.IsFalse(catalog.CanExecute("Action2", null, null, null)); // ev1, ev2, ev4
        }