Package org.jclouds.blobstore

Examples of org.jclouds.blobstore.KeyAlreadyExistsException


@Test(groups = "unit")
public class EndpointIfAlreadyExistsTest {

   @Test
   public void testFoundIsNullWhenEndpointNotSet() throws Exception {
      assertNull(getUnchecked(new EndpointIfAlreadyExists().create(new KeyAlreadyExistsException())));
   }
View Full Code Here


   @Test
   public void testFoundIsEndpointWhenSet() throws Exception {
      assertEquals(
            getUnchecked(new EndpointIfAlreadyExists().setEndpoint(URI.create("foo")).create(
                  new KeyAlreadyExistsException())), URI.create("foo"));
   }
View Full Code Here

               logger.warn(e, "exception reading error from response", response);
            }
         }
         if (error != null && error.getCode() == 1016) {
            File file = new File(command.getCurrentRequest().getEndpoint().getPath());
            exception = new KeyAlreadyExistsException(file.getParentFile().getAbsolutePath(), file.getName());
         } else {
            switch (response.getStatusCode()) {
            case 401:
               exception = new AuthorizationException(exception.getMessage(), exception);
               break;
View Full Code Here

@Test(groups = "unit")
public class EndpointIfAlreadyExistsTest {

   @Test
   public void testFoundIsNullWhenEndpointNotSet() throws Exception {
      assertNull(getUnchecked(new EndpointIfAlreadyExists().create(new KeyAlreadyExistsException())));
   }
View Full Code Here

   @Test
   public void testFoundIsEndpointWhenSet() throws Exception {
      assertEquals(
            getUnchecked(new EndpointIfAlreadyExists().setEndpoint(URI.create("foo")).create(
                  new KeyAlreadyExistsException())), URI.create("foo"));
   }
View Full Code Here

               logger.warn(e, "exception reading error from response", response);
            }
         }
         if (error != null && error.getCode() == 1016) {
            File file = new File(command.getCurrentRequest().getEndpoint().getPath());
            exception = new KeyAlreadyExistsException(file.getParentFile().getAbsolutePath(), file.getName());
         } else {
            switch (response.getStatusCode()) {
            case 401:
               exception = new AuthorizationException(exception.getMessage(), exception);
               break;
View Full Code Here

@Test(groups = "unit")
public class EndpointIfAlreadyExistsTest {

   @Test
   public void testFoundIsNullWhenEndpointNotSet() throws Exception {
      assertNull(getUnchecked(new EndpointIfAlreadyExists().create(new KeyAlreadyExistsException())));
   }
View Full Code Here

   @Test
   public void testFoundIsEndpointWhenSet() throws Exception {
      assertEquals(
            getUnchecked(new EndpointIfAlreadyExists().setEndpoint(URI.create("foo")).create(
                  new KeyAlreadyExistsException())), URI.create("foo"));
   }
View Full Code Here

@Test(groups = "unit")
public class EndpointIfAlreadyExistsTest {

   @Test
   public void testFoundIsNullWhenEndpointNotSet() throws Exception {
      assertNull(new EndpointIfAlreadyExists().createOrPropagate(new KeyAlreadyExistsException()));
   }
View Full Code Here

   @Test
   public void testFoundIsEndpointWhenSet() throws Exception {
      assertEquals(
            new EndpointIfAlreadyExists().setEndpoint(URI.create("foo")).createOrPropagate(
                  new KeyAlreadyExistsException()), URI.create("foo"));
   }
View Full Code Here

TOP

Related Classes of org.jclouds.blobstore.KeyAlreadyExistsException

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.