public void SetUp() { var databasePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "TestDatabase.db3"); if (File.Exists(databasePath)) File.Delete(databasePath); SqliteConnection.CreateFile(databasePath); this.database = new DatabaseObjects.Database(new SqliteConnection("Data Source=" + databasePath), DatabaseObjects.Database.ConnectionType.SQLite); var createTable = new DatabaseObjects.SQL.SQLCreateTable(); createTable.Name = "T1"; createTable.Fields.Add("Name", DatabaseObjects.SQL.DataType.UnicodeVariableCharacter, 100); using (var connection = new DatabaseObjects.ConnectionScope(this.database)) connection.ExecuteNonQuery(createTable); }
public void SetUp() { var databasePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "TestDatabase.db3"); if (File.Exists(databasePath)) { File.Delete(databasePath); } SqliteConnection.CreateFile(databasePath); this.database = new DatabaseObjects.Database(new SqliteConnection("Data Source=" + databasePath), DatabaseObjects.Database.ConnectionType.SQLite); var createTable = new DatabaseObjects.SQL.SQLCreateTable(); createTable.Name = "T1"; createTable.Fields.Add("Name", DatabaseObjects.SQL.DataType.UnicodeVariableCharacter, 100); using (var connection = new DatabaseObjects.ConnectionScope(this.database)) connection.ExecuteNonQuery(createTable); }