Exemplo n.º 1
0
        public async Task DeleteTable_CreateAndDelete_BackToPreviousState()
        {
            int tableNo1 = (await _tables.ListTableNamesAsync()).Count();

            await _tables.InsertAsync(_tableName, new[] { new Value("pk", "rk") });

            int tableNo2 = (await _tables.ListTableNamesAsync()).Count();

            Assert.Equal(tableNo1 + 1, tableNo2);

            await _tables.DeleteAsync(_tableName);

            int tableNo3 = (await _tables.ListTableNamesAsync()).Count();

            Assert.Equal(tableNo3, tableNo1);
        }
Exemplo n.º 2
0
        public async Task InitializeAsync()
        {
            //delete orphaned tables
            IReadOnlyCollection <string> tableNames = await _tables.ListTableNamesAsync();

            foreach (string table in tableNames.Where(n => n.StartsWith(TestTablePrefix)))
            {
                await _tables.DeleteAsync(table);
            }
        }