Example #1
0
 private void assertAdjacentHashesAre(String centerString, String[] adjacentStrings) {
   GeoHash center = GeoHash.fromGeohashString(centerString);
   GeoHash[] adjacent = center.getAdjacent();
   for (String check : adjacentStrings) {
     assertArrayContainsGeoHash(check, adjacent);
   }
 }
Example #2
0
 @Test
 public void testThatAdjacentHashesHavePointInitialized() {
   String center = "dqcjqc";
   GeoHash geohash = GeoHash.fromGeohashString(center);
   GeoHash[] adjacentHashes = geohash.getAdjacent();
   for (GeoHash adjacentHash : adjacentHashes) {
     assertNotNull(adjacentHash.getBoundingBox());
     assertNotNull(adjacentHash.getBoundingBoxCenterPoint());
     assertNotNull(adjacentHash.getPoint());
   }
 }