Exemple #1
0
  public static void outputImageMatchesBaseline(
      final WebResponse response, final String baselineImage) throws IOException {
    final File baseline = new File(baselineImage);

    assertTrue(baseline.exists());

    log.debug("Response content length: " + response.getContentLength());

    Raster raster = GDALUtils.toRaster(GDALUtils.open(response.getInputStream()));
    Assert.assertNotNull("Test Image: not loaded, could not read stream", raster);

    TestUtils.compareRasters(baseline, raster);
  }
Exemple #2
0
  public void testWSDL() throws Exception {
    WebConversation conversation = new WebConversation();
    String destination = testProps.getProperty("destination");
    if (destination != null && destination.length() > 0) {
      WebRequest request = new GetMethodWebRequest(destination + "?WSDL");

      WebResponse response = conversation.getResponse(request);

      int i = response.getContentLength();
      InputSource is = new InputSource(response.getInputStream());

      Document doc = builder.parse(is);

      doc.getDocumentElement();
      System.out.println("My test");
    }
  }