Examples of APIUnmarshaller


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

  @Test
  public void ec2DriverIsUnmarshalled() throws MalformedURLException, DeltaCloudClientException {
    API api = new API();
    ByteArrayInputStream inputStream = new ByteArrayInputStream(APIResponse.apiResponse.getBytes());
    new APIUnmarshaller().unmarshall(inputStream, api);
    assertNotNull(api);
    assertEquals(APIResponse.driver, api.getDriver().name().toLowerCase());
  }
View Full Code Here

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

  @Test
  public void invalidDriverUnmarshalledToUnknown() throws MalformedURLException, DeltaCloudClientException {
    API api = new API();
    ByteArrayInputStream inputStream = new ByteArrayInputStream(APIResponse.invalidDriverApiResponse.getBytes());
    new APIUnmarshaller().unmarshall(inputStream, api);
    assertNotNull(api);
    assertEquals(Driver.UNKNOWN, api.getDriver());
  }
View Full Code Here

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

  }

  public Driver getServerType() {
    try {
      InputStream response = request(new TypeRequest(baseUrl));
      API api = new APIUnmarshaller().unmarshall(response, new API());
      return api.getDriver();
    } catch (DeltaCloudClientException e) {
      return Driver.UNKNOWN;
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.