public MySqlSyncForeignKeysTestsFixture() { // create databases helperDb.CreateMySqlDatabase(serverDbName); helperDb.CreateMySqlDatabase(client1DbName); helperDb.CreateMySqlDatabase(client2DbName); // create table helperDb.ExecuteMySqlScript(serverDbName, createTableScript); // insert table helperDb.ExecuteMySqlScript(serverDbName, datas); }
public WordPressFixture() { // create client database helperDb.DropMySqlDatabase(clientDbName); helperDb.CreateMySqlDatabase(clientDbName); helperDb.DropMySqlDatabase(serverDbName); // restore server database var wordpressscript = Path.Combine(Directory.GetCurrentDirectory(), "Backup", "Wordpress.sql"); var fs = File.OpenText(wordpressscript); var script = fs.ReadToEnd(); helperDb.ExecuteMySqlScript("sys", script); var serverProvider = new MySqlSyncProvider(ServerConnectionString); var clientProvider = new MySqlSyncProvider(ClientMySqlConnectionString); var simpleConfiguration = new SyncConfiguration(Tables); Agent = new SyncAgent(clientProvider, serverProvider, simpleConfiguration); }