Changeset 14015 in josm for trunk/test


Ignore:
Timestamp:
2018-07-08T02:42:00+02:00 (6 years ago)
Author:
Don-vip
Message:

add unit tests on nominatim area name resolution

Location:
trunk/test/unit/org/openstreetmap/josm/io
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/io/OverpassDownloadReaderTest.java

    r13337 r14015  
    1111import static org.junit.Assert.assertTrue;
    1212
     13import java.io.StringReader;
    1314import java.time.LocalDateTime;
    1415import java.util.regex.Matcher;
     
    217218                "out body;"));
    218219    }
     220
     221    /**
     222     * Unit test of {@link OverpassDownloadReader#searchName(java.util.List)}
     223     * @throws Exception if an error occurs
     224     */
     225    @Test
     226    public void testSearchName() throws Exception {
     227        try (StringReader reader = new StringReader(NameFinderTest.SAMPLE)) {
     228            assertEquals(1942586L,
     229                    OverpassDownloadReader.searchName(NameFinder.parseSearchResults(reader)).getOsmId().getUniqueId());
     230        }
     231    }
    219232}
Note: See TracChangeset for help on using the changeset viewer.