public void TestRegExAnnotationIgnoredForPrimitiveOnActionParameter()
        {
            var method = FindMethod(typeof(Customer4), "SomeAction", new[] { typeof(int) });

            facetFactory.ProcessParams(Reflector, method, 0, Specification);
            Assert.IsNull(Specification.GetFacet(typeof(IRegExFacet)));
        }
示例#2
0
        public void TestRegExAnnotationIgnoredForPrimitiveOnActionParameter()
        {
            IImmutableDictionary <string, ITypeSpecBuilder> metamodel = new Dictionary <string, ITypeSpecBuilder>().ToImmutableDictionary();

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

            metamodel = facetFactory.ProcessParams(Reflector, method, 0, Specification, metamodel);
            Assert.IsNull(Specification.GetFacet(typeof(IRegExFacet)));
            Assert.IsNotNull(metamodel);
        }