Package org.jclouds.openstack.swift.config.SwiftRestClientModule

Examples of org.jclouds.openstack.swift.config.SwiftRestClientModule.KeystoneStorageEndpointModule


   /**
    * Test that specifying an empty region will return an arbitrary URL
    */
   @Test
   public void testEmptyRegion() {
      final KeystoneStorageEndpointModule moduleToTest = new KeystoneStorageEndpointModule();

      // Test with an empty Region - just ensure we get either a region 1,2 or 3
      // URI
      Supplier<URI> resultingSupplier = moduleToTest.provideStorageUrl(mockFactory, apiVersion, "");
      assertNotNull(resultingSupplier);
      URI resultingUri = resultingSupplier.get();
      assertNotNull(resultingUri);

      // Without a region our choice is arbitrary. We can't enforce an ordering
View Full Code Here


   /**
    * Test that specifying a region will return the correct URL
    */
   @Test
   public void testSpecificRegion() {
      final KeystoneStorageEndpointModule moduleToTest = new KeystoneStorageEndpointModule();

      // Iterate through our region names
      for (int i = 1; i <= 3; i++) {
         Supplier<URI> resultingSupplier = moduleToTest.provideStorageUrl(mockFactory, apiVersion, String.format("region%1$s", i));
         assertNotNull(resultingSupplier);
         URI resultingUri = resultingSupplier.get();
         assertNotNull(resultingUri);

         assertEquals(resultingUri.toString(),
View Full Code Here

   /**
    * Test that specifying an undefined region will return null
    */
   @Test
   public void testUndefinedRegion() {
      final KeystoneStorageEndpointModule moduleToTest = new KeystoneStorageEndpointModule();

      Supplier<URI> resultingSupplier = moduleToTest.provideStorageUrl(mockFactory, apiVersion, "region-that-dne");
      assertNotNull(resultingSupplier);
      URI resultingUri = resultingSupplier.get();
      assertNull(resultingUri);
   }
View Full Code Here

   /**
    * Test that specifying an empty region will return an arbitrary URL
    */
   @Test
   public void testEmptyRegion() {
      final KeystoneStorageEndpointModule moduleToTest = new KeystoneStorageEndpointModule();

      // Test with an empty Region - just ensure we get either a region 1, 2 or 3
      // URI
      Supplier<URI> resultingSupplier = moduleToTest.provideStorageUrl(mockFactory, apiVersion, "");
      assertNotNull(resultingSupplier);
      URI resultingUri = resultingSupplier.get();
      assertNotNull(resultingUri);

      // Without a region our choice is arbitrary. We can't enforce an ordering
View Full Code Here

   /**
    * Test that specifying a region will return the correct URL
    */
   @Test
   public void testSpecificRegion() {
      final KeystoneStorageEndpointModule moduleToTest = new KeystoneStorageEndpointModule();

      // Iterate through our region names
      for (int i = 1; i <= 3; i++) {
         Supplier<URI> resultingSupplier = moduleToTest.provideStorageUrl(mockFactory, apiVersion, String.format("region%1$s", i));
         assertNotNull(resultingSupplier);
         URI resultingUri = resultingSupplier.get();
         assertNotNull(resultingUri);

         assertEquals(resultingUri.toString(),
View Full Code Here

   /**
    * Test that specifying an undefined region will return null
    */
   @Test
   public void testUndefinedRegion() {
      final KeystoneStorageEndpointModule moduleToTest = new KeystoneStorageEndpointModule();

      Supplier<URI> resultingSupplier = moduleToTest.provideStorageUrl(mockFactory, apiVersion, "region-that-dne");
      assertNotNull(resultingSupplier);
      URI resultingUri = resultingSupplier.get();
      assertNull(resultingUri);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.openstack.swift.config.SwiftRestClientModule.KeystoneStorageEndpointModule

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.