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

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

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

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