01: package org.geoserver.wfs;
02:
03: import org.w3c.dom.Document;
04:
05: public class DescribeFeatureTest extends WFSTestSupport {
06:
07: public void testGet() throws Exception {
08: Document doc = getAsDOM("wfs?service=WFS&request=DescribeFeatureType&version=1.0.0");
09: assertEquals("xs:schema", doc.getDocumentElement()
10: .getNodeName());
11: }
12:
13: public void testPost() throws Exception {
14: String xml = "<wfs:DescribeFeatureType " + "service=\"WFS\" "
15: + "version=\"1.0.0\" "
16: + "xmlns:wfs=\"http://www.opengis.net/wfs\" />";
17:
18: Document doc = postAsDOM("wfs", xml);
19: assertEquals("xs:schema", doc.getDocumentElement()
20: .getNodeName());
21: }
22:
23: public void testPostDummyFeature() throws Exception {
24:
25: String xml = "<wfs:DescribeFeatureType " + "service=\"WFS\" "
26: + "version=\"1.0.0\" "
27: + "xmlns:wfs=\"http://www.opengis.net/wfs\" >"
28: + " <wfs:TypeName>cgf:DummyFeature</wfs:TypeName>"
29: + "</wfs:DescribeFeatureType>";
30:
31: Document doc = postAsDOM("wfs", xml);
32: assertEquals("ServiceExceptionReport", doc.getDocumentElement()
33: .getNodeName());
34:
35: }
36: }
|