Package com.apress.prospring.ch12.domain

Examples of com.apress.prospring.ch12.domain.Account


         }
      }
   }

   static void accountHasMetadata(AccountApi accountApi, Map<String, String> meta) {
      Account account = accountApi.get();
      for (Entry<String, String> entry : meta.entrySet()) {
         // note keys are returned in lower-case!
         assertEquals(account.getMetadata().get(entry.getKey().toLowerCase()), entry.getValue(),
               account + " didn't have metadata: " + entry);
      }
   }
View Full Code Here


            .addHeader(ACCOUNT_METADATA_PREFIX + "Apiname", "swift")
            .addHeader(ACCOUNT_METADATA_PREFIX + "Apiversion", "v1.1")));

      try {
         SwiftApi api = api(server.getUrl("/").toString(), "openstack-swift");
         Account account = api.getAccountApi("DFW").get();
         assertEquals(account.getContainerCount(), 3l);
         assertEquals(account.getObjectCount(), 42l);
         assertEquals(account.getBytesUsed(), 323479l);
         for (Entry<String, String> entry : metadata.entrySet()) {
            assertEquals(account.getMetadata().get(entry.getKey().toLowerCase()), entry.getValue());
         }

         assertEquals(server.getRequestCount(), 2);
         assertAuthentication(server);
         assertRequest(server.takeRequest(), "HEAD", "/v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9");
View Full Code Here

TOP

Related Classes of com.apress.prospring.ch12.domain.Account

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.