Esempio n. 1
0
            public ApplySchemaChangeTestData()
            {
                tables = new TableConf[2];
                //first table has no column list
                tables[0]            = new TableConf();
                tables[0].SchemaName = "dbo";
                tables[0].Name       = "test1";

                //second one has column list
                tables[1]            = new TableConf();
                tables[1].SchemaName = "dbo";
                tables[1].Name       = "test2";
                tables[1].ColumnList = new string[] { "column1", "column2" };

                sourceDataUtils = new TestDataUtils(TServer.RELAY);
                destDataUtils   = new TestDataUtils(TServer.SLAVE);

                testData = new DataSet();
                sourceDataUtils.testData = new DataSet();
                destDataUtils.testData   = new DataSet();
                //this method, conveniently, sets up the datatable schema we need
                sourceDataUtils.CreateSchemaChangeTable("CT_testdb", 1);

                Config.Tables  = tables.ToList();
                Config.RelayDB = "CT_testdb";
                var logger = new Logger(null, null, null, "");

                slave = new Slave(sourceDataUtils, destDataUtils, logger);
            }