private static void DeleteInventoryAndValidate() { DeleteBucketInventoryConfigurationRequest deleteBucketInventoryConfigurationRequest = new DeleteBucketInventoryConfigurationRequest() { BucketName = bucketName, InventoryId = "configId" }; var deleteBucketInventoryConfigurationResponse = Client.DeleteBucketInventoryConfiguration(deleteBucketInventoryConfigurationRequest); var response = Client.ListObjects(new ListObjectsRequest() { BucketName = bucketName }); var successFlag = true; if (response.S3Objects.Count > 0) { successFlag = false; } Assert.IsTrue(successFlag); }