Esempio n. 1
0
        public void TestPasswordAnnotationNotPickedUpOnActionParameter()
        {
            MethodInfo method = FindMethod(typeof(Customer4), "SomeAction", new[] { typeof(string) });

            facetFactory.ProcessParams(Reflector, method, 0, Specification);
            IFacet facet = Specification.GetFacet(typeof(IPasswordFacet));

            Assert.IsNull(facet);
        }
        public void TestPasswordAnnotationNotPickedUpOnActionParameter()
        {
            IImmutableDictionary <string, ITypeSpecBuilder> metamodel = new Dictionary <string, ITypeSpecBuilder>().ToImmutableDictionary();

            var method = FindMethod(typeof(Customer4), "SomeAction", new[] { typeof(string) });

            metamodel = facetFactory.ProcessParams(Reflector, method, 0, Specification, metamodel);
            var facet = Specification.GetFacet(typeof(IPasswordFacet));

            Assert.IsNull(facet);
            Assert.IsNotNull(metamodel);
        }