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

    assertTrue(baseline.exists());

    log.debug("Response content length: " + response.getLength());
    Raster raster = GDALUtils.toRaster(GDALUtils.open(response.getEntityInputStream()));
    Assert.assertNotNull("Test Image: not loaded, could not read stream", raster);

    TestUtils.compareRasters(baseline, raster);
  }