private static async Task TearDownTestAsync() { using (DatabaseWrapper) { await DatabaseWrapper.DropTableAsync(TableName); DatabaseWrapper.Close(); DatabaseWrapper.Destroy(DBPath); } }
public void CloseTest() { DatabaseWrapper.Close(); Assert.IsFalse(DatabaseWrapper.IsOpen); // if DB is closed, reopen for other tests if (!DatabaseWrapper.IsOpen) { DatabaseWrapper.OpenAsync(TestDbLocation).Wait(); } }
public async Task CreateOpenTest() { if (DatabaseWrapper.IsOpen) { DatabaseWrapper.Close(); } Assert.IsFalse(DatabaseWrapper.IsOpen); await DatabaseWrapper.OpenAsync(TestDbLocation); Assert.IsTrue(DatabaseWrapper.IsOpen); }
public void DestroyTest() { DatabaseWrapper.Close(); DatabaseWrapper.Destroy(TestDbLocation); Assert.IsFalse(File.Exists(TestDbLocation)); }
public void IsOpenTest() { Assert.IsTrue(DatabaseWrapper.IsOpen); DatabaseWrapper.Close(); Assert.IsFalse(DatabaseWrapper.IsOpen); }