private void CreateTablesFirst(MemoryDatabase db) { using (var conn = db.GetDbConnection()) { db.ExecuteCommand(@" CREATE TABLE IF NOT EXISTS Employee ( [Id] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, [Name] NVARCHAR(64) NOT NULL )"); } Assert.IsTrue(db.ExecuteScalar <int>("SELECT count(*) from [Employee]") == 0); }
public void Test_Create_Simple_Database() { var db = new MemoryDatabase(); db.Setup(); //TestCount(db, 0); CreateTablesFirst(db); CreateTables(db); TestCount(db, 0); CreateTablesFirst(db); db.GetDbConnection().Close(); TestCount(db, 0); //db.Close(); //TestCount(db, 0); }