コード例 #1
0
 @Test
 public void testGetChildren() throws JSONException {
   String parentId = "3175395";
   List<String> childrent = GeonamesHandler.getChildren(parentId);
   int expected = 20;
   assertEquals(expected, childrent.size());
 }
コード例 #2
0
 @Test
 public void testSearchName() throws JSONException {
   String geoId = "3175395";
   String name = GeonamesHandler.searchName(geoId);
   String expected = "Italy";
   assertEquals(expected, name);
 }
コード例 #3
0
 @Test
 public void testGetParent() throws JSONException {
   String childId = "2657896";
   String parent = GeonamesHandler.getParent(childId);
   String expected = "7287650";
   assertEquals(expected, parent);
 }