Changeset 14708 in josm for trunk/test/unit


Ignore:
Timestamp:
2019-01-20T13:47:48+01:00 (6 years ago)
Author:
GerdP
Message:

sonar: rename methoods for unit tests to start with test
no functional change

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/LanguageInfoTest.java

    r14664 r14708  
    88import java.util.stream.Stream;
    99
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1110import org.junit.Assert;
    1211import org.junit.Rule;
    1312import org.junit.Test;
    1413import org.openstreetmap.josm.testutils.JOSMTestRules;
     14
     15import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1516
    1617/**
     
    4142     */
    4243    @Test
    43     public void getWikiLanguagePrefix() {
    44         testWikiLanguagePrefixes(LanguageInfo.LocaleType.DEFAULT,
     44    public void testWikiLanguagePrefix() {
     45        testGetWikiLanguagePrefixes(LanguageInfo.LocaleType.DEFAULT,
    4546                "En:", "De:", "Pt_BR:", "Ca-Valencia:", "Zh_CN:", "Zh_TW:", "Ast:", "En_GB:", "Ru:", "Nb:");
    46         testWikiLanguagePrefixes(LanguageInfo.LocaleType.DEFAULTNOTENGLISH,
     47        testGetWikiLanguagePrefixes(LanguageInfo.LocaleType.DEFAULTNOTENGLISH,
    4748                null, "De:", "Pt_BR:", "Ca-Valencia:", "Zh_CN:", "Zh_TW:", "Ast:", "En_GB:", "Ru:", "Nb:");
    48         testWikiLanguagePrefixes(LanguageInfo.LocaleType.BASELANGUAGE,
     49        testGetWikiLanguagePrefixes(LanguageInfo.LocaleType.BASELANGUAGE,
    4950                null, null, "Pt:", null, "Zh:", "Zh:", null, null, null, null);
    50         testWikiLanguagePrefixes(LanguageInfo.LocaleType.ENGLISH,
     51        testGetWikiLanguagePrefixes(LanguageInfo.LocaleType.ENGLISH,
    5152                "", "", "", "", "", "", "", "", "", "");
    52         testWikiLanguagePrefixes(LanguageInfo.LocaleType.OSM_WIKI,
     53        testGetWikiLanguagePrefixes(LanguageInfo.LocaleType.OSM_WIKI,
    5354                "", "DE:", "Pt:", "Ca:", "Zh-hans:", "Zh-hant:", "Ast:", "", "RU:", "No:");
    5455    }
    5556
    56     private static void testWikiLanguagePrefixes(LanguageInfo.LocaleType type, String...expected) {
     57    private static void testGetWikiLanguagePrefixes(LanguageInfo.LocaleType type, String...expected) {
    5758        final List<String> actual = Stream.of(EN_CA, DE_DE, PT_BR, CA_ES_VALENCIA, ZN_CN, ZN_TW, AST, EN_GB, RU, NB)
    5859                .map(locale -> LanguageInfo.getWikiLanguagePrefix(locale, type))
     
    6566     */
    6667    @Test
    67     public void getJOSMLocaleCode() {
     68    public void testGetJOSMLocaleCode() {
    6869        Assert.assertEquals("de", LanguageInfo.getJOSMLocaleCode(DE_DE));
    6970        Assert.assertEquals("pt_BR", LanguageInfo.getJOSMLocaleCode(PT_BR));
     
    7576     */
    7677    @Test
    77     public void getJavaLocaleCode() {
     78    public void testGetJavaLocaleCode() {
    7879        Assert.assertEquals("ca__valencia", LanguageInfo.getJavaLocaleCode("ca@valencia"));
    7980    }
     
    8384     */
    8485    @Test
    85     public void getLanguageCodeXML() {
     86    public void testGetLanguageCodeXML() {
    8687        Assert.assertEquals("ca-valencia.", LanguageInfo.getLanguageCodeXML());
    8788    }
     
    9192     */
    9293    @Test
    93     public void getLanguageCodeManifest() {
     94    public void testGetLanguageCodeManifest() {
    9495        Assert.assertEquals("ca-valencia_", LanguageInfo.getLanguageCodeManifest());
    9596    }
     
    99100     */
    100101    @Test
    101     public void getLanguageCodes() {
     102    public void testGetLanguageCodes() {
    102103        Assert.assertEquals(Arrays.asList("ca_ES@valencia", "ca@valencia", "ca_ES", "ca"), LanguageInfo.getLanguageCodes(CA_ES_VALENCIA));
    103104    }
Note: See TracChangeset for help on using the changeset viewer.