Ejemplo n.º 1
0
        public void WhenDefaultSchemaConventionIsAppliedAndSchemaIsSetThenSchemaShouldNotBeChanged()
        {
            var expression = new AlterTableExpression {
                SchemaName = "testschema", TableName = "table1"
            };

            expression.ApplyConventions(new MigrationConventions());

            Assert.That(expression.SchemaName, Is.EqualTo("testschema"));
        }
Ejemplo n.º 2
0
        public void WhenDefaultSchemaConventionIsAppliedAndSchemaIsNotSetThenSchemaShouldBeNull()
        {
            var expression = new AlterTableExpression {
                TableName = "table1"
            };

            expression.ApplyConventions(new MigrationConventions());

            Assert.That(expression.SchemaName, Is.Null);
        }
Ejemplo n.º 3
0
        public void WhenDefaultSchemaConventionIsChangedAndSchemaIsNotSetThenSetSchema()
        {
            var expression = new AlterTableExpression {
                TableName = "table1"
            };
            var migrationConventions = new MigrationConventions {
                GetDefaultSchema = () => "testdefault"
            };

            expression.ApplyConventions(migrationConventions);

            Assert.That(expression.SchemaName, Is.EqualTo("testdefault"));
        }