private void assertAdjacentHashesAre(String centerString, String[] adjacentStrings) { GeoHash center = GeoHash.fromGeohashString(centerString); GeoHash[] adjacent = center.getAdjacent(); for (String check : adjacentStrings) { assertArrayContainsGeoHash(check, adjacent); } }
@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()); } }