Changeset 32887 in osm for applications/editors/josm/plugins/wikipedia/test
- Timestamp:
- 2016-08-30T10:52:38+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/wikipedia/test/unit/org/wikipedia
- Files:
-
- 1 added
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/wikipedia/test/unit/org/wikipedia/WikipediaAppTest.java
r32884 r32887 1 1 package org.wikipedia; 2 2 3 import org.junit.Before;4 3 import org.junit.Rule; 5 4 import org.junit.Test; 6 import org.openstreetmap.josm.Main;7 5 import org.openstreetmap.josm.data.coor.LatLon; 8 6 import org.openstreetmap.josm.testutils.JOSMTestRules; 9 import org.wikipedia.WikipediaApp.WikipediaEntry; 10 import org.wikipedia.WikipediaApp.WikipediaLangArticle; 7 import org.wikipedia.data.WikidataEntry; 8 import org.wikipedia.data.WikipediaEntry; 9 import org.wikipedia.data.WikipediaLangArticle; 11 10 12 11 import java.util.Arrays; … … 152 151 @Test 153 152 public void testForQuery() throws Exception { 154 final List<Wiki pediaApp.WikidataEntry> de = WikipediaApp.getWikidataEntriesForQuery("de", "Österreich", Locale.GERMAN);155 final List<Wiki pediaApp.WikidataEntry> en = WikipediaApp.getWikidataEntriesForQuery("de", "Österreich", Locale.ENGLISH);153 final List<WikidataEntry> de = WikipediaApp.getWikidataEntriesForQuery("de", "Österreich", Locale.GERMAN); 154 final List<WikidataEntry> en = WikipediaApp.getWikidataEntriesForQuery("de", "Österreich", Locale.ENGLISH); 156 155 assertThat(de.get(0).wikipediaArticle, is("Q40")); 157 156 assertThat(de.get(0).wikipediaLang, is("wikidata")); … … 191 190 // not found -> null 192 191 assertThat(WikipediaApp.getLabelForWikidata("Q" + Long.MAX_VALUE, Locale.ENGLISH), nullValue()); 193 final Wiki pediaApp.WikidataEntry q84 = newWikipediaApp.WikidataEntry("Q84", null, null, null);194 final Wiki pediaApp.WikidataEntry q1741 = newWikipediaApp.WikidataEntry("Q1741", null, null, null);195 final List<Wiki pediaApp.WikidataEntry> twoLabels = WikipediaApp.getLabelForWikidata(Arrays.asList(q84, q1741), Locale.GERMAN);192 final WikidataEntry q84 = new WikidataEntry("Q84", null, null, null); 193 final WikidataEntry q1741 = new WikidataEntry("Q1741", null, null, null); 194 final List<WikidataEntry> twoLabels = WikipediaApp.getLabelForWikidata(Arrays.asList(q84, q1741), Locale.GERMAN); 196 195 assertThat(twoLabels.get(0).label, is("London")); 197 196 assertThat(twoLabels.get(1).label, is("Wien")); -
applications/editors/josm/plugins/wikipedia/test/unit/org/wikipedia/gui/WikidataTagCellRendererTest.java
r32884 r32887 1 package org.wikipedia; 1 package org.wikipedia.gui; 2 2 3 3 import static org.hamcrest.CoreMatchers.is; … … 14 14 import org.junit.Test; 15 15 import org.openstreetmap.josm.testutils.JOSMTestRules; 16 import org.wikipedia.gui.WikidataTagCellRenderer; 16 17 17 18 public class WikidataTagCellRendererTest {
Note:
See TracChangeset
for help on using the changeset viewer.