Ignore:
Timestamp:
2016-07-17T19:01:53+02:00 (9 years ago)
Author:
simon04
Message:

JOSM/wikipedia: add prefix search for categories

File:
1 edited

Legend:

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

    r32626 r32670  
    66import org.openstreetmap.josm.data.coor.LatLon;
    77import org.openstreetmap.josm.tools.Predicate;
     8import org.openstreetmap.josm.tools.Predicates;
    89import org.openstreetmap.josm.tools.Utils;
    910import org.wikipedia.WikipediaApp.WikipediaEntry;
     
    214215        assertThat(entry3.getWiwosmStatus(), is(false));
    215216    }
     217
     218    @Test
     219    public void testCategoriesForPrefix() throws Exception {
     220        final List<String> categories = WikipediaApp.getCategoriesForPrefix("de", "Gemeinde in Öster");
     221        assertTrue(Utils.exists(categories, Predicates.equalTo("Gemeinde in Österreich")));
     222    }
    216223}
Note: See TracChangeset for help on using the changeset viewer.