Exemple #1
0
        public void TestActionWithNoParameters()
        {
            facetFactory.Process(Reflector, typeof(Customer), MethodRemover, Specification);

            AssertRemovedCalled(2);

            EventInfo eInfo = typeof(Customer).GetEvent("AnEventHandler");

            var eventMethods = new[] { eInfo.GetAddMethod(), eInfo.GetRemoveMethod() };

            foreach (MethodInfo removedMethod in eventMethods)
            {
                AssertMethodRemoved(removedMethod);
            }
        }
Exemple #2
0
        public void TestActionWithNoParameters()
        {
            IImmutableDictionary <string, ITypeSpecBuilder> metamodel = new Dictionary <string, ITypeSpecBuilder>().ToImmutableDictionary();

            metamodel = facetFactory.Process(Reflector, typeof(Customer), MethodRemover, Specification, metamodel);

            AssertRemovedCalled(2);

            var eInfo = typeof(Customer).GetEvent("AnEventHandler");

            var eventMethods = new[] { eInfo.GetAddMethod(), eInfo.GetRemoveMethod() };

            foreach (var removedMethod in eventMethods)
            {
                AssertMethodRemoved(removedMethod);
            }

            Assert.IsNotNull(metamodel);
        }