Package org.jclouds.blobstore

Examples of org.jclouds.blobstore.AsyncBlobStore


      ListenableFuture<PageSet<? extends StorageMetadata>> future = createMock(ListenableFuture.class);
      expect(future.get(anyLong(), anyObject(TimeUnit.class))).andThrow(new RuntimeException(new TimeoutException()));
      expect(future.cancel(true)).andReturn(true);
      replay(future);

      AsyncBlobStore asyncBlobStore = createMock(AsyncBlobStore.class);
      expect(asyncBlobStore.list(anyObject(String.class), anyObject(ListContainerOptions.class))).andReturn(future);
      replay(asyncBlobStore);

      deleter = new DeleteAllKeysInList(null, asyncBlobStore, null);
      try {
         deleter.execute(containerName, ListContainerOptions.NONE);
View Full Code Here


*/
@Test(groups = "unit")
public class BlobStoreUtilsTest {

   public void testCreateParentIfNeededAsyncNoPath() {
      AsyncBlobStore asyncBlobStore = createMock(AsyncBlobStore.class);
      String container = "container";
      Blob blob = createMock(Blob.class);
      MutableBlobMetadata md = createMock(MutableBlobMetadata.class);

      expect(blob.getMetadata()).andReturn(md).atLeastOnce();
View Full Code Here

      verify(blob);
      verify(md);
   }

   public void testCreateParentIfNeededAsyncSinglePath() {
      AsyncBlobStore asyncBlobStore = createMock(AsyncBlobStore.class);
      String container = "container";
      Blob blob = createMock(Blob.class);
      MutableBlobMetadata md = createMock(MutableBlobMetadata.class);

      expect(blob.getMetadata()).andReturn(md).atLeastOnce();
      expect(md.getName()).andReturn("rootpath/hello").atLeastOnce();
      expect(asyncBlobStore.createDirectory("container", "rootpath")).andReturn(null);

      replay(asyncBlobStore);
      replay(blob);
      replay(md);
View Full Code Here

      verify(blob);
      verify(md);
   }

   public void testCreateParentIfNeededAsyncNestedPath() {
      AsyncBlobStore asyncBlobStore = createMock(AsyncBlobStore.class);
      String container = "container";
      Blob blob = createMock(Blob.class);
      MutableBlobMetadata md = createMock(MutableBlobMetadata.class);

      expect(blob.getMetadata()).andReturn(md).atLeastOnce();
      expect(md.getName()).andReturn("rootpath/subpath/hello").atLeastOnce();
      expect(asyncBlobStore.createDirectory("container", "rootpath/subpath")).andReturn(null);

      replay(asyncBlobStore);
      replay(blob);
      replay(md);
View Full Code Here

*/
@Test(groups = "unit")
public class BlobStoreUtilsTest {

   public void testCreateParentIfNeededAsyncNoPath() {
      AsyncBlobStore asyncBlobStore = createMock(AsyncBlobStore.class);
      String container = "container";
      Blob blob = createMock(Blob.class);
      MutableBlobMetadata md = createMock(MutableBlobMetadata.class);

      expect(blob.getMetadata()).andReturn(md).atLeastOnce();
View Full Code Here

      verify(blob);
      verify(md);
   }

   public void testCreateParentIfNeededAsyncSinglePath() {
      AsyncBlobStore asyncBlobStore = createMock(AsyncBlobStore.class);
      String container = "container";
      Blob blob = createMock(Blob.class);
      MutableBlobMetadata md = createMock(MutableBlobMetadata.class);

      expect(blob.getMetadata()).andReturn(md).atLeastOnce();
      expect(md.getName()).andReturn("rootpath/hello").atLeastOnce();
      expect(asyncBlobStore.createDirectory("container", "rootpath")).andReturn(null);

      replay(asyncBlobStore);
      replay(blob);
      replay(md);
View Full Code Here

TOP

Related Classes of org.jclouds.blobstore.AsyncBlobStore

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.