01: package org.vfny.geoserver.wms.responses.featureinfo;
02:
03: import org.geoserver.data.test.MockData;
04: import org.geoserver.wms.WMSTestSupport;
05:
06: public class GetFeatureInfoTest extends WMSTestSupport {
07:
08: /**
09: * Tests a simple GetFeatureInfo works, and that the result contains the expected polygon
10: * @throws Exception
11: */
12: public void testSimple() throws Exception {
13: String layer = MockData.FORESTS.getPrefix() + ":"
14: + MockData.FORESTS.getLocalPart();
15: String request = "wms?bbox=-0.002,-0.002,0.002,0.002&styles=&format=jpeg&info_format=text/plain&request=GetFeatureInfo&layers="
16: + layer
17: + "&query_layers="
18: + layer
19: + "&width=20&height=20&x=10&y=10";
20: String result = getAsString(request);
21: assertNotNull(result);
22: assertTrue(result.indexOf("Green Forest") > 0);
23: }
24: }
|