Package org.jclouds.s3.xml

Examples of org.jclouds.s3.xml.ListBucketHandlerTest


               + sourceObject));
   }

   public ListenableFuture<String> putObject(final String bucketName, final S3Object object,
            PutObjectOptions... nullableOptions) {
      final PutObjectOptions options = (nullableOptions.length == 0) ? new PutObjectOptions() : nullableOptions[0];
      if (options.getAcl() != null)
         keyToAcl.put(bucketName + "/" + object.getMetadata().getKey(), options.getAcl());
      return blobStore.putBlob(bucketName, object2Blob.apply(object));
   }
View Full Code Here


         object.getMetadata().setKey(publicReadWriteObjectKey);
         object.setPayload("");
         // Public Read-Write object
         getApi()
                  .putObject(containerName, object,
                           new PutObjectOptions().withAcl(CannedAccessPolicy.PUBLIC_READ_WRITE));

         assertConsistencyAware(new Runnable() {
            public void run() {
               try {
                  AccessControlList acl = getApi().getObjectACL(containerName, publicReadWriteObjectKey);
View Full Code Here

      final String containerName = getContainerName();
      try {
         S3Object object = getApi().newS3Object();
         object.getMetadata().setKey(publicReadObjectKey);
         object.setPayload("");
         getApi().putObject(containerName, object, new PutObjectOptions().withAcl(CannedAccessPolicy.PUBLIC_READ));

         assertConsistencyAware(new Runnable() {
            public void run() {
               try {
                  AccessControlList acl = getApi().getObjectACL(containerName, publicReadObjectKey);
View Full Code Here

               + sourceObject));
   }

   public ListenableFuture<String> putObject(final String bucketName, final S3Object object,
            PutObjectOptions... nullableOptions) {
      final PutObjectOptions options = (nullableOptions.length == 0) ? new PutObjectOptions() : nullableOptions[0];
      if (options.getAcl() != null)
         keyToAcl.put(bucketName + "/" + object.getMetadata().getKey(), options.getAcl());
      return blobStore.putBlob(bucketName, object2Blob.apply(object));
   }
View Full Code Here

    */
   @Test
   public void testSinglePageResult() throws Exception {
      S3Client api = createMock(S3Client.class);
      ListBucketOptions options = new ListBucketOptions();
      ListBucketResponse response = new ListBucketHandlerTest().expected();

      expect(api.listBucket("bucket", options)).andReturn(response).once();

      EasyMock.replay(api);

View Full Code Here

   @Test
   public void testMultiPageResult() throws Exception {
      String nextMarker = "FOO";
      S3Client api = createMock(S3Client.class);
      ListBucketOptions options = new ListBucketOptions();
      ListBucketResponse response2 = new ListBucketHandlerTest().expected();
      ListBucketResponse response1 = new ListBucketResponseImpl(response2.getName(), response2, response2.getPrefix(),
            null, nextMarker, response2.getMaxKeys(), response2.getDelimiter(), false, response2.getCommonPrefixes());

      expect(api.listBucket("bucket", options)).andReturn(response1).once();
      expect(api.listBucket("bucket", options.afterMarker(nextMarker))).andReturn(response2).once();
View Full Code Here

    */
   @Test
   public void testSinglePageResult() throws Exception {
      S3Client api = createMock(S3Client.class);
      ListBucketOptions options = new ListBucketOptions();
      ListBucketResponse response = new ListBucketHandlerTest().expected();

      expect(api.listBucket("bucket", options)).andReturn(response).once();

      EasyMock.replay(api);

View Full Code Here

   @Test
   public void testMultiPageResult() throws Exception {
      String nextMarker = "FOO";
      S3Client api = createMock(S3Client.class);
      ListBucketOptions options = new ListBucketOptions();
      ListBucketResponse response2 = new ListBucketHandlerTest().expected();
      ListBucketResponse response1 = new ListBucketResponseImpl(response2.getName(), response2, response2.getPrefix(),
            null, nextMarker, response2.getMaxKeys(), response2.getDelimiter(), false, response2.getCommonPrefixes());

      expect(api.listBucket("bucket", options)).andReturn(response1).once();
      expect(api.listBucket("bucket", options.afterMarker(nextMarker))).andReturn(response2).once();
View Full Code Here

    */
   @Test
   public void testSinglePageResult() throws Exception {
      S3Client api = createMock(S3Client.class);
      ListBucketOptions options = new ListBucketOptions();
      ListBucketResponse response = new ListBucketHandlerTest().expected();

      expect(api.listBucket("bucket", options)).andReturn(response).once();

      EasyMock.replay(api);

View Full Code Here

   @Test
   public void testMultiPageResult() throws Exception {
      String nextMarker = "FOO";
      S3Client api = createMock(S3Client.class);
      ListBucketOptions options = new ListBucketOptions();
      ListBucketResponse response2 = new ListBucketHandlerTest().expected();
      ListBucketResponse response1 = new ListBucketResponseImpl(response2.getName(), response2, response2.getPrefix(),
            null, nextMarker, response2.getMaxKeys(), response2.getDelimiter(), false, response2.getCommonPrefixes());

      expect(api.listBucket("bucket", options)).andReturn(response1).once();
      expect(api.listBucket("bucket", options.afterMarker(nextMarker))).andReturn(response2).once();
View Full Code Here

TOP

Related Classes of org.jclouds.s3.xml.ListBucketHandlerTest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.