Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion of the test "update Simple Property Value" is too strict #41

Closed
lgoltz opened this issue Jul 14, 2016 · 1 comment
Closed

Comments

@lgoltz
Copy link
Contributor

lgoltz commented Jul 14, 2016

Since the fix in #34 also decimal types are handled and properties with this type are updated. This leads in our case to another problem. The test fails with the following reason:

Unexpected result evaluating XPath expression with context node app:osm_protected_area: tns:way_area[1] = "515609.00" 

The feature contains "515609.0" after the update (and before reset):

<wfs:FeatureCollection xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://www.deegree.org/app http://ogctestbed12.lat-lon:8080/deegree/services/wfs?SERVICE=WFS&amp;VERSION=2.0.0&amp;REQUEST=DescribeFeatureType&amp;OUTPUTFORMAT=application%2Fgml%2Bxml%3B+version%3D3.2&amp;TYPENAME=app:osm_protected_area&amp;NAMESPACES=xmlns(app,http%3A%2F%2Fwww.deegree.org%2Fapp)" timeStamp="2016-07-14T08:34:48Z" numberMatched="1" numberReturned="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:gml="http://www.opengis.net/gml/3.2">
   <wfs:boundedBy>
      <gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326">
         <gml:lowerCorner>63.850518 -22.008669</gml:lowerCorner>
         <gml:upperCorner>63.861933 -21.977922</gml:upperCorner>
      </gml:Envelope>
   </wfs:boundedBy>
   <wfs:member>
      <app:osm_protected_area gml:id="osm_protected_area_23" xmlns:app="http://www.deegree.org/app">
         <app:osm_id>411196906</app:osm_id>
         <app:boundary>protected_area</app:boundary>
         <app:leisure>nature_reserve</app:leisure>
         <app:name>Eldborg</app:name>
         <app:osm_timestamp>2016-04-18T02:55:32</app:osm_timestamp>
         <app:way_area>515609.0</app:way_area>
         <app:geometry>
            <!--Inlined geometry 'osm_protected_area_23_APP_GEOMETRY'-->
            <gml:Polygon gml:id="osm_protected_area_23_APP_GEOMETRY" srsName="urn:ogc:def:crs:EPSG::4326">
               ...
            </gml:Polygon>
         </app:geometry>
      </app:osm_protected_area>
   </wfs:member>
</wfs:FeatureCollection>

It seems, that a the differences in the notation of the decimal (with/without second 0) causes the assertion failure.

@lgoltz lgoltz changed the title assetrion of the test "update Simple Property Value" is too strict Assertion of the test "update Simple Property Value" is too strict Jul 14, 2016
@rjmartell
Copy link
Contributor

rjmartell commented Aug 2, 2016

A string comparison is being done here, not a numeric one. The assert should be modified to include datatype info so a cast can be performed if necessary.

e.g. number(tns:way_area[1]) eq 515609.00 evaluates to true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants