// @Test public void testWmsUrlTransformer4GetLegend() { initialize(); // No Spring in a GWT unit test. String getLegendUrl = wmsService.getLegendGraphicUrl(wmsConfig); // assertEquals(VALUE_URL, getLegendUrl.substring(0, getLegendUrl.indexOf('?'))); // assertTrue(hasParameter(getLegendUrl, "service", "WMS")); wmsService.setWmsUrlTransformer(toHelloWorld); getLegendUrl = wmsService.getLegendGraphicUrl(wmsConfig); // assertEquals(URL.encode(HELLOWORLD), getLegendUrl); }
// @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); }
// @Test public void testWmsUrlTransformer1() { initialize(); // No Spring in a GWT unit test. // assertNull(wmsService.getWmsUrlTransformer()); wmsService.setWmsUrlTransformer(toHelloWorld); // assertEquals(toHelloWorld, wmsService.getWmsUrlTransformer()); }