Ignore:
Timestamp:
2015-12-25T20:03:27+01:00 (9 years ago)
Author:
simon04
Message:

JOSM/wikipedia: Demystify Wikidata tags - see #josm9775

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/wikipedia/test/unit/org/wikipedia/WikipediaAppTest.java

    r31852 r31857  
    143143        assertThat(map.size(), is(4));
    144144    }
     145
     146    @Test
     147    public void testGetLabelForWikidata() throws Exception {
     148        assertThat(WikipediaApp.getLabelForWikidata("Q1741", "de"), is("Wien"));
     149        assertThat(WikipediaApp.getLabelForWikidata("Q1741", "en"), is("Vienna"));
     150        assertThat(WikipediaApp.getLabelForWikidata("Q" + Long.MAX_VALUE, "en"), nullValue());
     151    }
     152
     153    @Test(expected = RuntimeException.class)
     154    public void testGetLabelForWikidataInvalidId() throws Exception {
     155        WikipediaApp.getLabelForWikidata("Qxyz", "en");
     156    }
    145157}
Note: See TracChangeset for help on using the changeset viewer.