Skip to content

Commit

Permalink
[GEOS-8835] Return CITE compliance to normal after test
Browse files Browse the repository at this point in the history
  • Loading branch information
smithkm committed Jul 9, 2018
1 parent 20e4781 commit d9de0c2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
20 changes: 20 additions & 0 deletions src/wfs/src/test/java/org/geoserver/wfs/WFSTestSupport.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import org.custommonkey.xmlunit.SimpleNamespaceContext;
import org.custommonkey.xmlunit.XMLUnit;
import org.geoserver.data.test.CiteTestData;
Expand All @@ -17,6 +18,7 @@
import org.geoserver.platform.Service;
import org.geoserver.test.GeoServerSystemTestSupport;
import org.geoserver.wfs.xml.v1_0_0.WFSConfiguration;
import org.junit.After;

/**
* New Base support class for wfs tests.
Expand Down Expand Up @@ -97,4 +99,22 @@ protected List<String> getSupportedSpatialOperatorsList(boolean wfs1_0_0) {
"BBOX"
});
}

protected Boolean citeCompliant;

protected void setCiteCompliant(boolean value) {
WFSInfo wfs = getWFS();
citeCompliant = wfs.isCiteCompliant();
wfs.setCiteCompliant(value);
getGeoServer().save(wfs);
}

@After
public void resetCiteCompliant() {
if (Objects.nonNull(citeCompliant)) {
WFSInfo wfs = getWFS();
wfs.setCiteCompliant(citeCompliant);
getGeoServer().save(wfs);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -705,9 +705,7 @@ public void testEncodeSrsDimension() throws Exception {
+ getLayerId(SystemTestData.PRIMITIVEGEOFEATURE));
assertXpathExists("//gml:Point[@srsDimension = '2']", dom);

WFSInfo wfs = getWFS();
wfs.setCiteCompliant(true);
getGeoServer().save(wfs);
setCiteCompliant(true);

dom =
getAsDOM(
Expand Down

0 comments on commit d9de0c2

Please sign in to comment.