Exemplo n.º 1
0
        public void TestEagerlyAnnotationPickedUpOnClass()
        {
            annotationFacetFactory.Process(Reflector, typeof(Customer2), MethodRemover, Specification);
            var facet = Specification.GetFacet(typeof(IEagerlyFacet));

            Assert.IsNotNull(facet);
            Assert.IsTrue(facet is EagerlyFacet);
            var propertyDefaultFacetAnnotation = (EagerlyFacet)facet;

            Assert.AreEqual(EagerlyAttribute.Do.Rendering, propertyDefaultFacetAnnotation.What);
        }
Exemplo n.º 2
0
        public void TestEagerlyAnnotationPickedUpOnClass()
        {
            IImmutableDictionary <string, ITypeSpecBuilder> metamodel = new Dictionary <string, ITypeSpecBuilder>().ToImmutableDictionary();

            metamodel = annotationFacetFactory.Process(Reflector, typeof(Customer2), MethodRemover, Specification, metamodel);
            var facet = Specification.GetFacet(typeof(IEagerlyFacet));

            Assert.IsNotNull(facet);
            Assert.IsTrue(facet is EagerlyFacet);
            var propertyDefaultFacetAnnotation = (EagerlyFacet)facet;

            Assert.AreEqual(EagerlyAttribute.Do.Rendering, propertyDefaultFacetAnnotation.What);
            Assert.IsNotNull(metamodel);
        }