Package org.apache.deltacloud.client.unmarshal

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


  @Test
  public void instancesMayBeUnmarshalled() throws MalformedURLException, JAXBException, DeltaCloudClientException {
    ByteArrayInputStream inputStream = new ByteArrayInputStream(InstancesResponse.response.getBytes());
    List<Instance> instances = new ArrayList<Instance>();
    new InstancesUnmarshaller().unmarshall(inputStream, instances);
    assertEquals(2, instances.size());

    Instance instance = instances.get(0);
    assertEquals(InstancesResponse.id1, instance.getId());
    assertEquals(InstancesResponse.name1, instance.getName());
View Full Code Here


  @Override
  public List<Instance> listInstances() throws DeltaCloudClientException {
    InputStream inputStream = request(new ListInstancesRequest(baseUrl));
    List<Instance> instances = new ArrayList<Instance>();
    new InstancesUnmarshaller().unmarshall(inputStream, instances);
    return instances;
  }
View Full Code Here

TOP

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

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.