public void CreateNavigationPropertySetter_creates_a_setter_delegate_for_public_reference_property_and_accepts_derived_types()
            {
                var target = new PublicClass2d();
                var entity = new PublicClass1();

                DelegateFactory.CreateNavigationPropertySetter(
                    typeof(PublicClass1), typeof(PublicClass1).GetDeclaredProperty("PublicNavProperty"))(entity, target);

                Assert.Same(target, entity.PublicNavProperty);
            }
            public void CreateNavigationPropertySetter_creates_a_setter_delegate_for_public_reference_property_and_accepts_derived_types()
            {
                var target = new PublicClass2d();
                var entity = new PublicClass1();

                DelegateFactory.CreateNavigationPropertySetter(
                    typeof(PublicClass1), typeof(PublicClass1).GetProperty("PublicNavProperty"))(entity, target);

                Assert.Same(target, entity.PublicNavProperty);
            }
            public void CreatePropertySetter_can_create_a_delegate_for_a_reference_type_that_allows_a_derived_type_to_be_set()
            {
                var target = new PublicClass2d();
                var entity = new PublicClass1();

                DelegateFactory.CreatePropertySetter(
                    typeof(PublicClass1),
                    typeof(PublicClass1).GetDeclaredProperty("PublicNavProperty"),
                    allowNull: true)(entity, target);

                Assert.Same(target, entity.PublicNavProperty);
            }
            public void CreatePropertySetter_can_create_a_delegate_for_a_reference_type_that_allows_a_derived_type_to_be_set()
            {
                var target = new PublicClass2d();
                var entity = new PublicClass1();

                DelegateFactory.CreatePropertySetter(
                    typeof(PublicClass1),
                    typeof(PublicClass1).GetProperty("PublicNavProperty"),
                    allowNull: true)(entity, target);

                Assert.Same(target, entity.PublicNavProperty);
            }