コード例 #1
0
        public async Task DeleteBucket()
        {
            var createBucket =
                await _bucketsApi.CreateBucket(GenerateName("robot sensor"), RetentionRule(), _organization);

            Assert.IsNotNull(createBucket);

            var foundBucket = await _bucketsApi.FindBucketById(createBucket.Id);

            Assert.IsNotNull(foundBucket);

            // delete task
            await _bucketsApi.DeleteBucket(createBucket);

            var ioe = Assert.ThrowsAsync <HttpException>(async() => await _bucketsApi.FindBucketById(createBucket.Id));

            Assert.AreEqual("bucket not found", ioe.Message);
        }