public void HasName_should_set_name_on_underlying_configuration()
        {
            var configuration = new InsertModificationStoredProcedureConfiguration<Entity>();

            configuration.HasName("Foo");

            Assert.Equal("Foo", configuration.Configuration.Name);
        }
Пример #2
0
        public void HasName_should_set_name_on_underlying_configuration()
        {
            var configuration = new InsertModificationStoredProcedureConfiguration <Entity>();

            configuration.HasName("Foo");

            Assert.Equal("Foo", configuration.Configuration.Name);
        }
Пример #3
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);
        }
Пример #4
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);
        }
Пример #5
0
        public void Result_should_return_configuration_for_valid_property_expressions()
        {
            var configuration = new InsertModificationStoredProcedureConfiguration <Entity>();

            Assert.Same(configuration, configuration.Result(e => e.Int, "Foo"));
            Assert.Same(configuration, configuration.Result(e => e.Nullable, "Foo"));
            Assert.Same(configuration, configuration.Result(e => e.String, "Foo"));
            Assert.Same(configuration, configuration.Result(e => e.Bytes, "Foo"));
            Assert.Same(configuration, configuration.Result(e => e.Geography, "Foo"));
            Assert.Same(configuration, configuration.Result(e => e.Geometry, "Foo"));
        }
        public void Parameter_should_return_configuration_for_valid_property_expressions()
        {
            var configuration = new InsertModificationStoredProcedureConfiguration<Entity>();

            Assert.Same(configuration, configuration.Parameter(e => e.Int, "Foo"));
            Assert.Same(configuration, configuration.Parameter(e => e.Nullable, "Foo"));
            Assert.Same(configuration, configuration.Parameter(e => e.String, "Foo"));
            Assert.Same(configuration, configuration.Parameter(e => e.Bytes, "Foo"));
            Assert.Same(configuration, configuration.Parameter(e => e.Geography, "Foo"));
            Assert.Same(configuration, configuration.Parameter(e => e.Geometry, "Foo"));
            Assert.Same(configuration, configuration.Parameter(e => e.ComplexType.Int, "Foo"));
        }
        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);
        }
        public void Result_should_throw_when_complex_property_expressions()
        {
            var configuration = new InsertModificationStoredProcedureConfiguration<Entity>();

            Assert.Throws<InvalidOperationException>(() => configuration.Result(e => e.ComplexType.Int, "Foo"));
        }
Пример #10
0
        public void Result_should_throw_when_complex_property_expressions()
        {
            var configuration = new InsertModificationStoredProcedureConfiguration <Entity>();

            Assert.Throws <InvalidOperationException>(() => configuration.Result(e => e.ComplexType.Int, "Foo"));
        }