示例#1
0
        public void TestIdempotentAnnotationPickedUp()
        {
            MethodInfo actionMethod = FindMethod(typeof(Customer1), "SomeAction");

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

            Assert.IsNotNull(facet);
            Assert.IsTrue(facet is IdempotentFacet);
            AssertNoMethodsRemoved();
        }
        public void TestIdempotentAnnotationPickedUp()
        {
            IImmutableDictionary <string, ITypeSpecBuilder> metamodel = new Dictionary <string, ITypeSpecBuilder>().ToImmutableDictionary();

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

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

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