コード例 #1
0
  //	@Test
  public void testWmsUrlTransformer4GetMap() {
    initialize(); // No Spring in a GWT unit test.

    //		assertNull(wmsService.getWmsUrlTransformer());
    String getLegendUrl = wmsService.getLegendGraphicUrl(wmsConfig);
    //		assertEquals(VALUE_URL, getLegendUrl.substring(0, getLegendUrl.indexOf('?')));
    //		assertTrue(hasParameter(getLegendUrl, "service", "WMS"));

    wmsService.setWmsUrlTransformer(toHelloWorld);
    Bbox bounds = new Bbox(0, 1, 100, 100);
    String getMapUrl = wmsService.getMapUrl(wmsConfig, VALUE_CRS2, bounds, VALUE_SIZE, VALUE_SIZE);
    //		assertEquals(URL.encode(HELLOWORLD), getMapUrl);
  }
コード例 #2
0
  //	@Test
  public void testGetMapUrlInvertedAxis() {
    initialize(); // No Spring in a GWT unit test.
    Bbox bounds = new Bbox(0, 1, 100, 100);
    String getMapUrl = wmsService.getMapUrl(wmsConfig, VALUE_CRS, bounds, VALUE_SIZE, VALUE_SIZE);

    //		assertEquals(VALUE_URL, getMapUrl.substring(0, getMapUrl.indexOf('?')));
    //		assertTrue(hasParameter(getMapUrl, "service", "WMS"));
    //		assertTrue(hasParameter(getMapUrl, "layers", wmsConfig.getLayers()));
    //		assertTrue(hasParameter(getMapUrl, "width", VALUE_SIZE + ""));
    //		assertTrue(hasParameter(getMapUrl, "height", VALUE_SIZE + ""));
    //		assertTrue(hasParameter(getMapUrl, "bbox", "1.0,0.0,101.0,100.0"));
    //		assertTrue(hasParameter(getMapUrl, "format", wmsConfig.getFormat()));
    //		assertTrue(hasParameter(getMapUrl, "version", wmsConfig.getVersion().toString()));
    //		assertTrue(hasParameter(getMapUrl, "crs", VALUE_CRS));
    //		assertTrue(hasParameter(getMapUrl, "styles", wmsConfig.getStyles()));
    //		assertTrue(hasParameter(getMapUrl, "transparent", wmsConfig.isTransparent() + ""));
    //		assertTrue(hasParameter(getMapUrl, "request", "GetMap"));
  }