public void SetUp() { IExecutor ex; switch (SqlType) { case SqlType.Sqlite: ex = new SqliteExecutor(SqliteConnection); break; case SqlType.MySql: ex = new MySqlExecutor(MySqlConnection); break; case SqlType.TSql: ex = new TSqlExecutor(TSqlConnection); break; default: throw new Exception($"Invalid sql type {SqlType}"); } Executor = new TestExecutor(ex, SqlType); PrintStatusOnFailure = true; Logger = new TestLogger(); }
private static void CreateSqliteTable(List <SqliteTable> sqliteTableList, string sqliteFilePath) { foreach (var sqliteTable in sqliteTableList) { var template = new CreateSqliteTableTemplate(); template.SqliteTable = sqliteTable; var content = template.TransformText(); System.Diagnostics.Debug.WriteLine(content); using (var sqliteConn = ConnectionProvider.GetSqliteConn(sqliteFilePath)) { SqliteExecutor.Execute(content, sqliteConn); } } }