Ignore:
Timestamp:
2016-08-30T10:52:38+02:00 (8 years ago)
Author:
simon04
Message:

JOSM/wikipedia: reorganize (separate classes, packages)

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  
    11package org.wikipedia;
    22
    3 import org.junit.Before;
    43import org.junit.Rule;
    54import org.junit.Test;
    6 import org.openstreetmap.josm.Main;
    75import org.openstreetmap.josm.data.coor.LatLon;
    86import org.openstreetmap.josm.testutils.JOSMTestRules;
    9 import org.wikipedia.WikipediaApp.WikipediaEntry;
    10 import org.wikipedia.WikipediaApp.WikipediaLangArticle;
     7import org.wikipedia.data.WikidataEntry;
     8import org.wikipedia.data.WikipediaEntry;
     9import org.wikipedia.data.WikipediaLangArticle;
    1110
    1211import java.util.Arrays;
     
    152151    @Test
    153152    public void testForQuery() throws Exception {
    154         final List<WikipediaApp.WikidataEntry> de = WikipediaApp.getWikidataEntriesForQuery("de", "Österreich", Locale.GERMAN);
    155         final List<WikipediaApp.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);
    156155        assertThat(de.get(0).wikipediaArticle, is("Q40"));
    157156        assertThat(de.get(0).wikipediaLang, is("wikidata"));
     
    191190        // not found -> null
    192191        assertThat(WikipediaApp.getLabelForWikidata("Q" + Long.MAX_VALUE, Locale.ENGLISH), nullValue());
    193         final WikipediaApp.WikidataEntry q84 = new WikipediaApp.WikidataEntry("Q84", null, null, null);
    194         final WikipediaApp.WikidataEntry q1741 = new WikipediaApp.WikidataEntry("Q1741", null, null, null);
    195         final List<WikipediaApp.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);
    196195        assertThat(twoLabels.get(0).label, is("London"));
    197196        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;
     1package org.wikipedia.gui;
    22
    33import static org.hamcrest.CoreMatchers.is;
     
    1414import org.junit.Test;
    1515import org.openstreetmap.josm.testutils.JOSMTestRules;
     16import org.wikipedia.gui.WikidataTagCellRenderer;
    1617
    1718public class WikidataTagCellRendererTest {
Note: See TracChangeset for help on using the changeset viewer.