Skip to content

Commit

Permalink
fixed test by using old versions of test resources
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoltz committed Nov 16, 2020
1 parent 71c770f commit 73f6963
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public void test200Example01()
throws Exception {

DescribeFeatureTypeXMLAdapter parser = new DescribeFeatureTypeXMLAdapter();
parser.load( get200ExampleUrl( "DescribeFeatureType_Example01_Request.xml" ) );
parser.load( DescribeFeatureTypeXMLAdapterTest.class.getResource(
"wfs200/DescribeFeatureType_Example01_Request.xml" ) );
DescribeFeatureType request = parser.parse();
assertEquals( VERSION_200, request.getVersion() );
assertEquals( null, request.getHandle() );
Expand All @@ -83,14 +84,20 @@ public void test200Example02()
throws Exception {

DescribeFeatureTypeXMLAdapter parser = new DescribeFeatureTypeXMLAdapter();
parser.load( get200ExampleUrl( "DescribeFeatureType_Example02_Request.xml" ) );
parser.load( DescribeFeatureTypeXMLAdapterTest.class.getResource(
"wfs200/DescribeFeatureType_Example02_Request.xml" ) );
DescribeFeatureType request = parser.parse();
assertEquals( VERSION_200, request.getVersion() );
assertEquals( null, request.getHandle() );
assertEquals( "text/xml; subtype=gml/3.2", request.getOutputFormat() );
assertEquals( 1, request.getTypeNames().length );
}

/**
* TODO: Unused until https://github.com/deegree/deegree3/issues/1091 is implemented.
* @param name
* @return
*/
private URL get200ExampleUrl( String name ) {
try {
String url = new RedirectingEntityResolver().redirect( WFS200_EXAMPLES_BASE_URL + name );
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" ?>
<DescribeFeatureType
service="WFS"
version="2.0.0"
xmlns="http://www.opengis.net/wfs/2.0"
xmlns:myns="http://www.myserver.com/myns"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs/2.0
http://schemas.opengis.net/wfs/2.0/wfs.xsd">
<TypeName>myns:TreesA_1M</TypeName>
<TypeName>myns:RoadL_1M</TypeName>
</DescribeFeatureType>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" ?>
<DescribeFeatureType
service="WFS"
version="2.0.0"
outputFormat="text/xml; subtype=gml/3.2"
xmlns="http://www.opengis.net/wfs/2.0"
xmlns:myns="http://www.someserver.com/myns"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs/2.0
http://schemas.opengis.net/wfs/2.0/wfs.xsd">
<TypeName>myns:Person</TypeName>
</DescribeFeatureType>

0 comments on commit 73f6963

Please sign in to comment.