public void Exists_finds_existing_table() { var connection = SqliteTestConnection.CreateScratch(); connection.Open(); using (var cmd = connection.DbConnection.CreateCommand()) { cmd.CommandText = "CREATE TABLE __migrationHistory (column1);"; connection.Open(); cmd.ExecuteNonQuery(); } var hp = new SqliteHistoryRepository(connection, new TestContext(), new SqliteUpdateSqlGenerator()); Assert.True(hp.Exists()); }
public void Exists_no_table() { var connection = SqliteTestConnection.CreateScratch(); var hp = new SqliteHistoryRepository(connection, new TestContext(), new SqliteUpdateSqlGenerator()); Assert.False(hp.Exists()); }