Beispiel #1
0
        public async Task ListBuckets()
        {
            string tempBucketName = "testbucket-" + Guid.NewGuid();
            await BucketClient.CreateBucketAsync(tempBucketName).ConfigureAwait(false);

            ListBucketsResponse listResp = await BucketClient.ListBucketsAsync().ConfigureAwait(false);

            Assert.True(listResp.Buckets.Count > 0);

            S3Bucket bucketObj = Assert.Single(listResp.Buckets, bucket => bucket.Name == tempBucketName);

            Assert.Equal(bucketObj.CreatedOn.UtcDateTime, DateTime.UtcNow, TimeSpan.FromSeconds(5));
        }