public SqliteSyncAllColumnsFixture() { var builder = new SqliteConnectionStringBuilder { DataSource = ClientSqliteFilePath }; this.ClientSqliteConnectionString = builder.ConnectionString; GC.Collect(); GC.WaitForPendingFinalizers(); if (File.Exists(ClientSqliteFilePath)) File.Delete(ClientSqliteFilePath); // create databases helperDb.CreateDatabase(serverDbName); // create table helperDb.ExecuteScript(serverDbName, createTableScript); // insert table helperDb.ExecuteScript(serverDbName, datas); var serverProvider = new SqlSyncProvider(ServerConnectionString); var clientProvider = new SqliteSyncProvider(ClientSqliteFilePath); var simpleConfiguration = new SyncConfiguration(new[] { "AllColumns" }); Agent = new SyncAgent(clientProvider, serverProvider, simpleConfiguration); }
public SQLiteSyncSimpleFixture() { var builder = new SQLiteConnectionStringBuilder { DataSource = ClientSQLiteFilePath }; this.ClientSQLiteConnectionString = builder.ConnectionString; if (File.Exists(ClientSQLiteFilePath)) { File.Delete(ClientSQLiteFilePath); } // create databases helperDb.CreateDatabase(serverDbName); // create table helperDb.ExecuteScript(serverDbName, createTableScript); // insert table helperDb.ExecuteScript(serverDbName, datas); var serverProvider = new SqlSyncProvider(ServerConnectionString); var clientProvider = new SQLiteSyncProvider(ClientSQLiteFilePath); var simpleConfiguration = new SyncConfiguration(Tables); Agent = new SyncAgent(clientProvider, serverProvider, simpleConfiguration); }
public MySqlAllColumnsFixture() { // create databases helperDb.CreateDatabase(serverDbName); helperDb.CreateMySqlDatabase(client1DbName); // create table helperDb.ExecuteScript(serverDbName, createTableScript); }
public SyncSimpleFixture() { // create databases helperDb.CreateDatabase(serverDbName); helperDb.CreateDatabase(client1DbName); // create table helperDb.ExecuteScript(serverDbName, createTableScript); // insert table helperDb.ExecuteScript(serverDbName, datas); }
public SyncReinitializeTestsHttpFixture() { // create databases helperDb.CreateDatabase(serverDbName); helperDb.CreateDatabase(client1DbName); // create table helperDb.ExecuteScript(serverDbName, createTableScript); // insert table helperDb.ExecuteScript(serverDbName, datas); }
public MySqlSyncIdentityColumnNotPkFixture() { // create databases helperDb.CreateDatabase(serverDbName); helperDb.CreateMySqlDatabase(client1DbName); // create table helperDb.ExecuteScript(serverDbName, createTableScript); // insert table helperDb.ExecuteScript(serverDbName, datas); }
public MySqlSyncOneTableOneFieldFixture() { // create databases helperDb.CreateDatabase(serverDbName); helperDb.CreateMySqlDatabase(client1DbName); // create table helperDb.ExecuteScript(serverDbName, createTableScript); // insert table helperDb.ExecuteScript(serverDbName, datas); }
public SyncPreffixAndSuffixWithSchemaFixture() { // create databases helperDb.CreateDatabase(serverDbName); helperDb.CreateDatabase(client1DbName); // create table helperDb.ExecuteScript(serverDbName, createSchemaScript); helperDb.ExecuteScript(serverDbName, createTableScript); // insert table helperDb.ExecuteScript(serverDbName, datas); }
public SqliteSyncSimpleFixture() { var builder = new SqliteConnectionStringBuilder { DataSource = ClientSqliteFilePath }; this.ClientSqliteConnectionString = builder.ConnectionString; if (File.Exists(ClientSqliteFilePath)) { File.Delete(ClientSqliteFilePath); } // create databases helperDb.CreateDatabase(serverDbName); // create table helperDb.ExecuteScript(serverDbName, createTableScript); // insert table helperDb.ExecuteScript(serverDbName, datas); var serverProvider = new SqlSyncProvider(ServerConnectionString); SqliteConnection c = new SqliteConnection($"Data Source=fabrikamde.db"); c.StateChange += (_, e) => { if (e.CurrentState == ConnectionState.Open) { var cmd = c.CreateCommand(); cmd.CommandText = "PRAGMA journal_mode=WAL;"; var i = cmd.ExecuteScalar(); } }; c.Open(); c.Close(); var clientProvider = new SqliteSyncProvider(ClientSqliteFilePath); var totoClientProvider = new SqliteSyncProvider( @"Data Source=D:\database\myData.db;Journal Mode=WAL;Page Size=8192"); SqliteConnectionStringBuilder sqliteConnectionStringBuilder = new SqliteConnectionStringBuilder(); var simpleConfiguration = new SyncConfiguration(Tables); Agent = new SyncAgent(clientProvider, serverProvider, simpleConfiguration); }
public MySqlSyncSimpleFixture() { // create databases helperDb.CreateDatabase(serverDbName); // create table helperDb.ExecuteScript(serverDbName, createTableScript); // insert table helperDb.ExecuteScript(serverDbName, datas); helperDb.CreateMySqlDatabase(clientDbName); var serverProvider = new SqlSyncProvider(ServerConnectionString); var clientProvider = new MySqlSyncProvider(ClientMySqlConnectionString); Agent = new SyncAgent(clientProvider, serverProvider, Tables); }
public SQLiteTwoTablesFixture() { //var builder = new SQLiteConnectionStringBuilder { DataSource = ClientSQLiteFilePath }; GC.Collect(); GC.WaitForPendingFinalizers(); if (File.Exists(ClientSQLiteFilePath)) { File.Delete(ClientSQLiteFilePath); } // create databases helperDb.CreateDatabase(serverDbName); // create table helperDb.ExecuteScript(serverDbName, createTableScript); // insert table helperDb.ExecuteScript(serverDbName, datas); }
public SqliteSyncHttpFixture() { var builder = new SqliteConnectionStringBuilder { DataSource = ClientSqliteFilePath }; this.ClientSqliteConnectionString = builder.ConnectionString; if (File.Exists(ClientSqliteFilePath)) { File.Delete(ClientSqliteFilePath); } // create databases helperDb.CreateDatabase(serverDbName); // create table helperDb.ExecuteScript(serverDbName, createTableScript); // insert table helperDb.ExecuteScript(serverDbName, datas); }