Esempio n. 1
0
        private static async Task TearDownTestAsync()
        {
            using (DatabaseWrapper)
            {
                await DatabaseWrapper.DropTableAsync(TableName);

                DatabaseWrapper.Close();
                DatabaseWrapper.Destroy(DBPath);
            }
        }
Esempio n. 2
0
        public void CloseTest()
        {
            DatabaseWrapper.Close();
            Assert.IsFalse(DatabaseWrapper.IsOpen);

            // if DB is closed, reopen for other tests
            if (!DatabaseWrapper.IsOpen)
            {
                DatabaseWrapper.OpenAsync(TestDbLocation).Wait();
            }
        }
Esempio n. 3
0
        public async Task CreateOpenTest()
        {
            if (DatabaseWrapper.IsOpen)
            {
                DatabaseWrapper.Close();
            }

            Assert.IsFalse(DatabaseWrapper.IsOpen);
            await DatabaseWrapper.OpenAsync(TestDbLocation);

            Assert.IsTrue(DatabaseWrapper.IsOpen);
        }
Esempio n. 4
0
 public void DestroyTest()
 {
     DatabaseWrapper.Close();
     DatabaseWrapper.Destroy(TestDbLocation);
     Assert.IsFalse(File.Exists(TestDbLocation));
 }
Esempio n. 5
0
 public void IsOpenTest()
 {
     Assert.IsTrue(DatabaseWrapper.IsOpen);
     DatabaseWrapper.Close();
     Assert.IsFalse(DatabaseWrapper.IsOpen);
 }