Example #1
0
        public void WhenDefaultSchemaConventionIsAppliedAndSchemaIsNotSetThenSchemaShouldBeNull()
        {
            var sequenceDefinition = new SequenceDefinition {
                Name = "Test"
            };

            sequenceDefinition.ApplyConventions(new MigrationConventions());

            Assert.That(sequenceDefinition.SchemaName, Is.Null);
        }
Example #2
0
        public void WhenDefaultSchemaConventionIsAppliedAndSchemaIsSetThenSchemaShouldNotBeChanged()
        {
            var sequenceDefinition = new SequenceDefinition {
                Name = "Test", SchemaName = "testschema"
            };

            sequenceDefinition.ApplyConventions(new MigrationConventions());

            Assert.That(sequenceDefinition.SchemaName, Is.EqualTo("testschema"));
        }
Example #3
0
        public void WhenDefaultSchemaConventionIsChangedAndSchemaIsNotSetThenSetSchema()
        {
            var sequenceDefinition = new SequenceDefinition {
                Name = "Test"
            };
            var migrationConventions = new MigrationConventions {
                GetDefaultSchema = () => "testdefault"
            };

            sequenceDefinition.ApplyConventions(migrationConventions);

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