예제 #1
0
        public SyncWithClientInitialDatasTestsFixture()
        {
            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, createTableScriptServer);
            helperDb.ExecuteSqliteScript(this.ClientSqliteConnectionString, createTableScriptClient);

            // insert table
            CreateTableAndDatas(new SqlConnection(HelperDB.GetDatabaseConnectionString(serverDbName)));
            CreateTableAndDatas(new SqliteConnection(this.ClientSqliteConnectionString));
        }