Beispiel #1
0
        public void SchemaOverridesCanBeAppliedDirectly()
        {
            //Arrange
            var collection = new SqlSnapshotCollection(DbController.ConnectionString);

            collection.ConfigureSchema("Test");

            //Act
            collection.DefineTable("[Test].[A_Main]").IsPredictable("MainId");

            //Assert
            var output = new Output();

            collection.GetSchemaReport(output, true);
            output.Report.Verify();
        }
Beispiel #2
0
        public void SchemaOverridesCanBeLoadedFromAssembly()
        {
            //Arrange
            var collection = new SqlSnapshotCollection(DbController.ConnectionString);

            collection.ConfigureSchema("Test");

            //Act
            collection.LoadSchemaOverrides(GetType().Assembly);

            //Assert
            var output = new Output();

            collection.GetSchemaReport(output, true);
            output.Report.Verify();
        }
        public void SchemaConfigurationIsConsistent()
        {
            //Arrange
            var collection = new SqlSnapshotCollection(Config.ConnectionString);

            //Act
            collection.ConfigureSchema("Chess"); //this loads table definitions direct from the database schema. In theory no further config should be required

            //Assert
            var output = new Output();

            output.WrapLine("Default schema");
            output.WriteLine();
            collection.GetSchemaReport(output, true);
            output.Report.Verify();
        }