Ejemplo n.º 1
0
        public void TestNotPersistedAnnotationPickedUpOnCollection()
        {
            var property = FindProperty(typeof(Customer1), "Orders");

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

            Assert.IsNotNull(facet);
            Assert.IsTrue(facet is NotPersistedFacet);
            AssertNoMethodsRemoved();
        }
Ejemplo n.º 2
0
        public void TestNotPersistedAnnotationPickedUpOnCollection()
        {
            IImmutableDictionary <string, ITypeSpecBuilder> metamodel = new Dictionary <string, ITypeSpecBuilder>().ToImmutableDictionary();

            var property = FindProperty(typeof(Customer1), "Orders");

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

            Assert.IsNotNull(facet);
            Assert.IsTrue(facet is NotPersistedFacet);
            AssertNoMethodsRemoved();
            Assert.IsNotNull(metamodel);
        }