Пример #1
0
        public void DeleteUnitTestBucket()
        {
            string testBucketName = "ListBucketsTestBucket";
            ServiceStackB2Api api = new ServiceStackB2Api();

            var deleteResponse = api.DeleteBucket(testBucketName);
            Assert.AreEqual(testBucketName, deleteResponse.BucketName);
        }
Пример #2
0
        public void DeleteUnitTestBuckets()
        {
            string testBucketName = "UnitTestBucket";
            ServiceStackB2Api api = new ServiceStackB2Api();

            //todo: replace with if Bucket.Exists maybe? Account.HasBucket(name)?
            try
            {
                var deleteResponse = api.DeleteBucket(testBucketName);
                Assert.AreEqual(testBucketName, deleteResponse.BucketName);
            }
            catch (BucketNotFoundException)
            {
                Debug.WriteLine("Warning, couldn't delete test bucket");
            }
        }