예제 #1
0
        public void TestDefaultDateOnlyOnProperty()
        {
            var property = FindProperty(typeof(Test), "ADate1");

            facetFactory.Process(Reflector, property, MethodRemover, Specification);
            var facet = Specification.GetFacet(typeof(IDateOnlyFacet));

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

            PropertyInfo property = FindProperty(typeof(Test), "ADate1");

            metamodel = facetFactory.Process(Reflector, property, MethodRemover, Specification, metamodel);
            IFacet facet = Specification.GetFacet(typeof(IDateOnlyFacet));

            Assert.IsNotNull(facet);
            Assert.IsTrue(facet is DateOnlyFacet);
            Assert.IsNotNull(metamodel);
        }