private void TestSyntax(string commandText) { // test if it can be parsed var parsed = TSQL.TSQLTokenizer.ParseTokens(commandText).ToArray();; using (var database = new FMSC.ORM.SQLite.SQLiteDatastore()) { database.Invoking(x => x.Execute("EXPLAIN " + commandText)).Should().NotThrow(); } }
public void CreateTables_Test() { using (var database = new FMSC.ORM.SQLite.SQLiteDatastore()) { var dbBuilder = new CruiseDatastoreBuilder_V3(); database.Invoking(x => x.CreateDatastore(dbBuilder)).Should().NotThrow(); foreach (var table in CruiseDatastoreBuilder_V3.TABLE_DEFINITIONS) { Output.WriteLine(table.TableName); database.CheckTableExists(table.TableName).Should().BeTrue(table.TableName); } //foreach(var view in CruiseDatastoreBuilder_V3.VIEW_DEFINITIONS) //{ // database.CheckTableExists(view.ViewName).Should().BeTrue(); //} } }