public void TestDisabledAnnotationPickedUpOnAction()
        {
            MethodInfo actionMethod = FindMethod(typeof(Customer2), "SomeAction");

            facetFactory.Process(Reflector, actionMethod, MethodRemover, Specification);
            IFacet facet = Specification.GetFacet(typeof(IDisabledFacet));

            Assert.IsNotNull(facet);
            Assert.IsTrue(facet is DisabledFacetAbstract);
            AssertNoMethodsRemoved();
        }
示例#2
0
        public void TestDisabledAnnotationPickedUpOnAction()
        {
            IImmutableDictionary <string, ITypeSpecBuilder> metamodel = new Dictionary <string, ITypeSpecBuilder>().ToImmutableDictionary();

            var actionMethod = FindMethod(typeof(Customer2), "SomeAction");

            metamodel = facetFactory.Process(Reflector, actionMethod, MethodRemover, Specification, metamodel);
            var facet = Specification.GetFacet(typeof(IDisabledFacet));

            Assert.IsNotNull(facet);
            Assert.IsTrue(facet is DisabledFacetAbstract);
            AssertNoMethodsRemoved();
            Assert.IsNotNull(metamodel);
        }