public async Task DeleteBucket() { var b2http = new B2Http(); var bucketName = RandomString.Next(16); var a = await AuthorizeAccount(b2http); var c = await b2http.CreateBucket(a.apiUrl, a.authorizationToken, a.accountId, bucketName, "allPrivate"); Assert.IsNotNull(c.bucketId); await b2http.DeleteBucket(a.apiUrl, a.authorizationToken, a.accountId, c.bucketId); }
/// <summary> /// Delete the bucket. Swallow any exceptions, failure to delete the bucket is not itself a test failure, /// and might hide an actual problem. /// </summary> public void Dispose() { try { api.DeleteBucket(ApiUrl, AuthToken, AccountId, BucketId).Wait(); } catch (Exception) { } }