Example #1
0
 @Test
 public void testGetCharacterPrecisionWorksWhenPrecisionIsMultipleOfFive() throws Exception {
   GeoHash hash = GeoHash.withBitPrecision(37.7, -122.52, 60);
   int precision = hash.getCharacterPrecision();
   assertEquals(precision, 12);
 }
Example #2
0
 @Test(expected = IllegalStateException.class)
 public void testGetCharacterPrecisionThrows() throws Exception {
   GeoHash hash = GeoHash.withBitPrecision(37.7, -122.52, 32);
   hash.getCharacterPrecision();
 }