Esempio n. 1
0
        public void Association_when_reference_should_throw_when_complex_property_expression()
        {
            var configuration = new InsertModificationStoredProcedureConfiguration <Entity>();

            Assert.Equal(
                Strings.InvalidPropertyExpression("e => e.Parent.Parent"),
                Assert.Throws <InvalidOperationException>(
                    () => configuration.Navigation <Entity>(e => e.Parent.Parent, c => { })).Message);
        }
Esempio n. 2
0
        public void Association_when_reference_should_invoke_action_with_configuration()
        {
            var configuration = new InsertModificationStoredProcedureConfiguration <Entity>();

            AssociationModificationStoredProcedureConfiguration <Entity> associationConfiguration = null;

            configuration.Navigation <Entity>(e => e.Parent, c => { associationConfiguration = c; });

            Assert.NotNull(associationConfiguration);
        }
        public void Association_when_reference_should_throw_when_complex_property_expression()
        {
            var configuration = new InsertModificationStoredProcedureConfiguration<Entity>();

            Assert.Equal(
                Strings.InvalidPropertyExpression("e => e.Parent.Parent"),
                Assert.Throws<InvalidOperationException>(
                    () => configuration.Navigation<Entity>(e => e.Parent.Parent, c => { })).Message);
        }
        public void Association_when_reference_should_invoke_action_with_configuration()
        {
            var configuration = new InsertModificationStoredProcedureConfiguration<Entity>();

            AssociationModificationStoredProcedureConfiguration<Entity> associationConfiguration = null;

            configuration.Navigation<Entity>(e => e.Parent, c => { associationConfiguration = c; });

            Assert.NotNull(associationConfiguration);
        }