Package org.jclouds.glacier.domain

Examples of org.jclouds.glacier.domain.PaginatedVaultCollection


      api.createVault(VAULT_NAME3);
   }

   @Test(dependsOnMethods = {"testCreateVault"})
   public void testListAndDescribeVaults() throws Exception {
      PaginatedVaultCollection vaults = api.listVaults();
      assertThat(vaults).containsAll(ImmutableList.of(
            api.describeVault(VAULT_NAME1),
            api.describeVault(VAULT_NAME2),
            api.describeVault(VAULT_NAME3)));
   }
View Full Code Here


      mr.addHeader(HttpHeaders.CONTENT_TYPE, MediaType.JSON_UTF_8);
      mr.setBody(getResponseBody("/json/listVaultsWithQueryParamsResponseBody.json"));
      mr.addHeader(HttpHeaders.CONTENT_LENGTH, mr.getBody().length);
      server.enqueue(mr);

      PaginatedVaultCollection vaults = client.listVaults(PaginationOptions.Builder.limit(2).marker(VAULT_ARN1));
      assertThat(vaults).extracting("vaultName").containsExactly(VAULT_NAME1, VAULT_NAME2);
      assertThat(vaults.nextMarker().get()).isEqualTo(VAULT_ARN3);

      assertEquals(server.takeRequest().getRequestLine(),
              "GET /-/vaults?limit=2&marker=" + urlEncode(VAULT_ARN1, '/') + " " + HTTP);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.glacier.domain.PaginatedVaultCollection

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.