From 9b50a01af6d2424d05de0ba5488de17521a46e5c Mon Sep 17 00:00:00 2001 From: peterneubauer Date: Wed, 17 Apr 2013 16:23:02 +0200 Subject: [PATCH] typo in the error message, added test for withinDistance --- .../org/neo4j/gis/spatial/indexprovider/LayerNodeIndex.java | 2 +- .../org/neo4j/gis/spatial/SpatialPluginFunctionalTest.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/neo4j/gis/spatial/indexprovider/LayerNodeIndex.java b/src/main/java/org/neo4j/gis/spatial/indexprovider/LayerNodeIndex.java index 288a3df74..aa0068591 100644 --- a/src/main/java/org/neo4j/gis/spatial/indexprovider/LayerNodeIndex.java +++ b/src/main/java/org/neo4j/gis/spatial/indexprovider/LayerNodeIndex.java @@ -275,7 +275,7 @@ else if ( key.equals( BBOX_QUERY ) ) else { throw new UnsupportedOperationException( String.format( - "only %s, %S and %s are implemented.", WITHIN_QUERY, + "only %s, %s and %s are implemented.", WITHIN_QUERY, WITHIN_DISTANCE_QUERY, BBOX_QUERY ) ); } return null; diff --git a/src/test/java/org/neo4j/gis/spatial/SpatialPluginFunctionalTest.java b/src/test/java/org/neo4j/gis/spatial/SpatialPluginFunctionalTest.java index 16c6cf1d0..96242b833 100644 --- a/src/test/java/org/neo4j/gis/spatial/SpatialPluginFunctionalTest.java +++ b/src/test/java/org/neo4j/gis/spatial/SpatialPluginFunctionalTest.java @@ -100,7 +100,9 @@ public void querying_with_cypher() throws UnsupportedEncodingException assertTrue(response.contains( "60.1" )); response = post(Status.OK,"{\"query\":\"start node = node:geom(\'bbox:[15.0,15.3,60.0,60.2]\') return node\"}", "http://localhost:"+PORT+"/db/data/cypher"); assertTrue(response.contains( "node" )); - + response = post(Status.OK,"{\"query\":\"start node = node:geom(\'withinDistance:[15.0,15.3,60.0,60.2, 5.0]\') return node\"}", "http://localhost:"+PORT+"/db/data/cypher"); + assertTrue(response.contains( "node" )); + } private String post(Status status, String payload, String endpoint) {