private static void CleanupTables() { ITableService tableService = new TableService(StorageAccount.Name, StorageAccount.Key); Table[] tables = tableService.ListTables(); bool failure = false; foreach (Table table in tables) { if (table.Name.StartsWith("Test", StringComparison.OrdinalIgnoreCase)) { bool deleteSuccess = tableService.DeleteTable(table.Name); if (!deleteSuccess) { Console.WriteLine("Failed to delete table named '{0}'.", table.Name); failure = true; } } } Assert.IsFalse(failure, "The clean-up failed to delete at least one table, see console output for more information."); }
public void IntegrationTestListNamesWithRetries() { ITableService tableService = new TableService(StorageAccount.Name, StorageAccount.Key); Table[] tables = tableService.ListTables(2); Assert.IsTrue(tables.Length > 0, "The table list was empty when it was not expected to be so."); foreach (Table table in tables) { Console.WriteLine("Found table name - " + table.Name); } }