Skip to content

Commit

Permalink
Fixed test #929
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Jun 13, 2024
1 parent 7d1b615 commit 134b2f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions grails-app/services/au/org/ala/ecodata/SpatialService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ class SpatialService {
//
// start = end
// Geometry boundaryGeometry = GeometryUtils.geoJsonMapToGeometry(boundaryGeoJson)
def proxy = grailsApplication.mainContext.spatialService
Geometry boundaryGeometry = proxy.getGeoJsonForPidToGeometry(boundaryPid)
//def proxy = grailsApplication.mainContext.spatialService
Geometry boundaryGeometry = getGeoJsonForPidToGeometry(boundaryPid)
long end = System.currentTimeMillis()
log.debug("Time taken to convert geojson to geometry for pid $boundaryPid: ${end-start}ms")

Expand Down
4 changes: 2 additions & 2 deletions src/test/groovy/au/org/ala/ecodata/SpatialServiceSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class SpatialServiceSpec extends Specification implements ServiceUnitTest<Spatia
then:
response["cl22"].size() == 1
response["cl22"][0].name == "ACT"
1 * webService.get("/ws/shapes/wkt/123") >> ([type: "Polygon", coordinates: [[[5, 0], [5, 5], [0, 5], [0, 0], [5, 0]]]] as JSON).toString()
1 * webService.get("/ws/shapes/wkt/456") >> ([type: "Polygon", coordinates: [[[11.5, 9.5], [11.5, 11.5], [9.5, 11.5], [9.5, 9.5], [11.5, 9.5]]]] as JSON).toString()
1 * webService.get("/ws/shapes/wkt/123") >> GeometryUtils.geoJsonMapToGeometry([type: "Polygon", coordinates: [[[5, 0], [5, 5], [0, 5], [0, 0], [5, 0]]]])
1 * webService.get("/ws/shapes/wkt/456") >> GeometryUtils.geoJsonMapToGeometry([type: "Polygon", coordinates: [[[11.5, 9.5], [11.5, 11.5], [9.5, 11.5], [9.5, 9.5], [11.5, 9.5]]]])
}
}

0 comments on commit 134b2f6

Please sign in to comment.