@Test public void testListMyBucketsWithDelimiterSlashAndCommonPrefixesAppsSlash() throws HttpException { ListBucketResponse bucket = createParser().parse( Strings2.toInputStream(listBucketWithSlashDelimiterAndCommonPrefixApps)); assertEquals(bucket.getCommonPrefixes().iterator().next(), "apps/"); assertEquals(bucket.getDelimiter(), "/"); assert bucket.getMarker() == null; }
@Test public void testListMyBucketsWithDelimiterSlashAndCommonPrefixesAppsSlash() throws HttpException { ListBucketResponse bucket = createParser().parse( Strings2.toInputStream(listBucketWithSlashDelimiterAndCommonPrefixApps)); assertEquals(bucket.getCommonPrefixes().iterator().next(), "apps/"); assertEquals(bucket.getDelimiter(), "/"); assert bucket.getMarker() == null; }
@Test public void testListMyBucketsWithPrefixAppsSlash() throws HttpException { ListBucketResponse bucket = createParser().parse(Strings2.toInputStream(listBucketWithPrefixAppsSlash)); assertEquals(bucket.getPrefix(), "apps/"); assertEquals(bucket.getMaxKeys(), 1000); assert bucket.getMarker() == null; }
@Test public void testListMyBucketsWithPrefixAppsSlash() throws HttpException { ListBucketResponse bucket = createParser().parse(Strings2.toInputStream(listBucketWithPrefixAppsSlash)); assertEquals(bucket.getPrefix(), "apps/"); assertEquals(bucket.getMaxKeys(), 1000); assert bucket.getMarker() == null; }
public void testListBucketMarker() throws InterruptedException, ExecutionException, TimeoutException { String bucketName = getContainerName(); try { addAlphabetUnderRoot(bucketName); ListBucketResponse bucket = getApi().listBucket(bucketName, afterMarker("y")); assertEquals(bucket.getMarker(), "y"); assert !bucket.isTruncated(); assertEquals(bucket.size(), 1); } finally { returnContainer(bucketName); } }
public void testListBucketMarker() throws InterruptedException, ExecutionException, TimeoutException { String bucketName = getContainerName(); try { addAlphabetUnderRoot(bucketName); ListBucketResponse bucket = getApi().listBucket(bucketName, afterMarker("y")); assertEquals(bucket.getMarker(), "y"); assert !bucket.isTruncated(); assertEquals(bucket.size(), 1); } finally { returnContainer(bucketName); } }