Package org.apache.deltacloud.client.unmarshal

Examples of org.apache.deltacloud.client.unmarshal.KeysUnmarshaller


  @Test
  public void keysMayBeUnmarshalled() throws MalformedURLException, JAXBException, DeltaCloudClientException {
    ByteArrayInputStream inputStream = new ByteArrayInputStream(KeysResponse.keysResponse.getBytes());
    List<Key> keys = new ArrayList<Key>();
    new KeysUnmarshaller().unmarshall(inputStream, keys);
    assertEquals(2, keys.size());
    Key key = keys.get(0);
    assertEquals(KeysResponse.id1, key.getId());
    assertEquals(KeysResponse.fingerprint1, key.getFingerprint());
    assertEquals(new URL(KeysResponse.url1), key.getUrl());
View Full Code Here


  }

  public List<Key> listKeys() throws DeltaCloudClientException {
    InputStream inputStream = request(new ListKeysRequest(baseUrl));
    List<Key> keys = new ArrayList<Key>();
    new KeysUnmarshaller().unmarshall(inputStream, keys);
    return keys;
  }
View Full Code Here

TOP

Related Classes of org.apache.deltacloud.client.unmarshal.KeysUnmarshaller

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.