Beispiel #1
0
        public void TestGetSchemaFiles_When_TwoTables_And_WildcardOne()
        {
            IAXmlWriter xmlWriter = AXmlFactory.CreateWriter();

            xmlWriter.WriteSchema(CreateTableDefinition("testtable1"), _folder + "testtable1" + "." + SchemaFileSuffix);
            xmlWriter.WriteSchema(CreateTableDefinition("testtable2"), _folder + "testtable2" + "." + SchemaFileSuffix);

            List <string> tableNames = new List <string> {
                "testtable_"
            };
            List <string> schemaFiles = FileHelper.GetSchemaFiles(_folder, tableNames, SchemaFileSuffix);

            schemaFiles.Should().Equal(_folder + "testtable1" + "." + SchemaFileSuffix, _folder + "testtable2" + "." + SchemaFileSuffix);
        }
Beispiel #2
0
        public void TestGetSchemaFiles_When_TwoTables()
        {
            IAXmlWriter   xmlWriter  = AXmlFactory.CreateWriter();
            List <string> tableNames = new List <string> {
                "testtable1", "testtable2"
            };

            xmlWriter.WriteSchema(CreateTableDefinition(tableNames[0]), _folder + tableNames[0] + "." + SchemaFileSuffix);
            xmlWriter.WriteSchema(CreateTableDefinition(tableNames[1]), _folder + tableNames[1] + "." + SchemaFileSuffix);

            List <string> schemaFiles = FileHelper.GetSchemaFiles(_folder, tableNames, SchemaFileSuffix);

            schemaFiles.Should().Equal(_folder + tableNames[0] + ".aschema", _folder + tableNames[1] + "." + SchemaFileSuffix);
        }
Beispiel #3
0
        private IXmlSchema SetupXmlSchemaAndTable(bool setU4Indexes = true)
        {
            var xmlSchema = XmlSchemaFactory.CreateInstance(DbContext);

            if (setU4Indexes)
            {
                var u4Indexes = U4IndexesFactory.CreateInstance(DbContext);
                u4Indexes.AagTableName  = Aagindex;
                u4Indexes.AsysTableName = Asysindex;
                xmlSchema.U4Indexes     = u4Indexes;
            }
            xmlSchema.XmlWriter = AXmlFactory.CreateWriter();
            TestTableCreator.CreateTestTableWithIndex(DbContext, TestTable);
            TestTableCreator.CreateIndexTables(DbContext, Asysindex, Aagindex);
            return(xmlSchema);
        }