private static void DeleteAnalyticsBucketAndValidate() { DeleteBucketAnalyticsConfigurationRequest deleteBucketAnalyticsConfigurationRequest = new DeleteBucketAnalyticsConfigurationRequest() { BucketName = bucketName, AnalyticsId = "configId" }; var deleteBucketAnalyticsConfigurationResponse = Client.DeleteBucketAnalyticsConfiguration(deleteBucketAnalyticsConfigurationRequest); var response = Client.ListObjects(new ListObjectsRequest() { BucketName = bucketName }); var successFlag = true; if (response.S3Objects.Count > 0) { successFlag = false; } Assert.IsTrue(successFlag); }