Пример #1
0
        public void GeneratorForeignKeyComposite2(SqlEngineVersion version)
        {
            var db        = new ForeignKeyCompositeSetForeignKeyTo();
            var generator = new BimGenerator(DataDefinitionDocumenterTestsHelper.CreateTestGeneratorContext(version, new DocumenterTests.TableCustomizer()), version, "ForeignKeyCompositeSetForeignKeyTo");

            generator.Generate(db);
        }
Пример #2
0
        public void GeneratorForeignKeyComposite1(SqlEngineVersion version)
        {
            var db = new ForeignKeyComposite();

            var generator = new BimGenerator(DataDefinitionDocumenterTestsHelper.CreateTestGeneratorContext(version), version, "ForeignKeyComposite");

            generator.Generate(db);
        }
Пример #3
0
        public void GeneratorTestDatabaseFks(SqlEngineVersion version)
        {
            var db = new TestDatabaseFks();

            var generator = new BimGenerator(DataDefinitionDocumenterTestsHelper.CreateTestGeneratorContext(version, new DocumenterTests.TableCustomizer()), version, "TestDatabaseFks");

            generator.Generate(db);
        }
Пример #4
0
        public void GeneratorTabularRelation(SqlEngineVersion version)
        {
            var db = new TabularRelation();

            var generator = new BimGenerator(DataDefinitionDocumenterTestsHelper.CreateTestGeneratorContext(version), version, "TabularRelation");

            generator.Generate(db);
        }
Пример #5
0
        public void GeneratorIndex(SqlEngineVersion version)
        {
            var db = new TestDatabaseIndex();
            var documenterContext = DataDefinitionDocumenterTestsHelper.CreateTestGeneratorContext(version, new DocumenterTests.TableCustomizer());
            var writer            = CSharpTypedWriterFactory.GetCSharpTypedWriter(version, documenterContext, "TestDatabaseIndex");
            var generator         = new CSharpTypedGenerator(writer, version, "TestDatabaseIndex", "FizzCode.DbTools.DataDefinitionDocumenter.Tests");

            generator.GenerateMultiFile(db);
        }
Пример #6
0
        public void GeneratorForeignKeyComposite2Typed_SingleFile(SqlEngineVersion version)
        {
            var dd = new ForeignKeyCompositeSetForeignKeyTo();
            var documenterContext = DataDefinitionDocumenterTestsHelper.CreateTestGeneratorContext(version, new DocumenterTests.TableCustomizer());
            var writer            = CSharpTypedWriterFactory.GetCSharpTypedWriter(version, documenterContext, "ForeignKeyCompositeSetForeignKeyTo");
            var generator         = new CSharpTypedGenerator(writer, version, "TestDatabaseFkNoCheckTest", "FizzCode.DbTools.DataDefinitionDocumenter.Tests");

            generator.GenerateSingleFile(dd, $"GeneratorForeignKeyComposite2Typed_SingleFile_{version}.cs");
        }
Пример #7
0
        public void GeneratorForeignKeyComposite2(SqlEngineVersion version)
        {
            var db = new ForeignKeyCompositeSetForeignKeyTo();
            var documenterContext = DataDefinitionDocumenterTestsHelper.CreateTestGeneratorContext(version, new DocumenterTests.TableCustomizer());
            var writer            = CSharpTypedWriterFactory.GetCSharpTypedWriter(version, documenterContext, "ForeignKeyCompositeSetForeignKeyTo");
            var generator         = new CSharpTypedGenerator(writer, version, "ForeignKeyCompositeSetForeignKeyTo", "FizzCode.DbTools.DataDefinitionDocumenter.Tests");

            generator.GenerateMultiFile(db);
        }
Пример #8
0
        public void GeneratorSqlTableCustomPropertyConstructor(SqlEngineVersion version)
        {
            var db = new SqlTableCustomPropertyConstructor();
            var documenterContext = DataDefinitionDocumenterTestsHelper.CreateTestGeneratorContext(version, new DocumenterTests.TableCustomizer());
            var writer            = CSharpTypedWriterFactory.GetCSharpTypedWriter(version, documenterContext, "SqlTableCustomPropertyDbTyped");
            var generator         = new CSharpTypedGenerator(writer, version, "SqlTableCustomPropertyConstructor", "FizzCode.DbTools.DataDefinitionDocumenter.Tests");

            generator.GenerateSingleFile(db, $"SqlTableCustomPropertyConstructor_{version}.cs");
        }
        public void GeneratorUniqueConstratintAsFk(SqlEngineVersion version)
        {
            var db = new DbUniqueConstratintAsFk();
            var documenterContext = DataDefinitionDocumenterTestsHelper.CreateTestGeneratorContext(version, new DocumenterTests.TableCustomizer());
            var writer            = CSharpWriterFactory.GetCSharpWriter(version, documenterContext, "DbUniqueConstratintAsFk");
            var generator         = new CSharpGenerator(writer, version, "DbUniqueConstratintAsFk", "FizzCode.DbTools.DataDefinitionDocumenter.Tests");

            generator.GenerateMultiFile(db);
        }
        public void GeneratorForeignKeyComposite1(SqlEngineVersion version)
        {
            var db = new ForeignKeyComposite();

            var documenterContext = DataDefinitionDocumenterTestsHelper.CreateTestGeneratorContext(version);
            var writer            = CSharpWriterFactory.GetCSharpWriter(version, documenterContext, "ForeignKeyComposite");
            var generator         = new CSharpGenerator(writer, version, "ForeignKeyComposite", "FizzCode.DbTools.DataDefinitionDocumenter.Tests");

            generator.GenerateMultiFile(db);
        }
Пример #11
0
        public void FkNoCheckTest()
        {
            var version = MsSqlVersion.MsSql2016;

            var dd = new TestDatabaseFkNoCheckTest();
            var documenterContext = DataDefinitionDocumenterTestsHelper.CreateTestGeneratorContext(version, new DocumenterTests.TableCustomizer());
            var writer            = CSharpTypedWriterFactory.GetCSharpTypedWriter(version, documenterContext, "TestDatabaseFkNoCheckTest");
            var generator         = new CSharpTypedGenerator(writer, version, "TestDatabaseFkNoCheckTest", "FizzCode.DbTools.DataDefinitionDocumenter.Tests");

            generator.GenerateSingleFile(dd, $"TestDatabaseFkNoCheckTest_Typed_{version}.cs");
        }