01: package org.geoserver.wfs.v1_1;
02:
03: import org.geoserver.wfs.WFSTestSupport;
04: import org.geotools.filter.v1_1.OGC;
05: import org.w3c.dom.Document;
06:
07: public class LockFeatureTest extends WFSTestSupport {
08:
09: public void testLock() throws Exception {
10: String xml = "<wfs:LockFeature xmlns:sf=\"http://cite.opengeospatial.org/gmlsf\" xmlns:wfs=\"http://www.opengis.net/wfs\" expiry=\"5\" handle=\"LockFeature-tc1\" "
11: + " lockAction=\"ALL\" "
12: + " service=\"WFS\" "
13: + " version=\"1.1.0\">"
14: + "<wfs:Lock handle=\"lock-1\" typeName=\"sf:PrimitiveGeoFeature\"/>"
15: + "</wfs:LockFeature>";
16:
17: Document dom = postAsDOM("wfs", xml);
18: assertEquals("wfs:LockFeatureResponse", dom
19: .getDocumentElement().getNodeName());
20: assertEquals(5, dom.getElementsByTagNameNS(OGC.NAMESPACE,
21: "FeatureId").getLength());
22: }
23: }
|