Ignore:
Timestamp:
2019-04-22T16:43:22+02:00 (6 years ago)
Author:
Don-vip
Message:

see #17634 - use case insensitive comparison, forbid google as source

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogTest.java

    r15013 r15015  
    99import java.awt.GraphicsEnvironment;
    1010import java.util.Arrays;
     11import java.util.Collections;
    1112import java.util.List;
    1213import java.util.Map;
     
    261262
    262263    private static void doTestValidateUploadTag(String prefix) {
     264        List<String> def = Collections.emptyList();
    263265        Config.getPref().putList(prefix + ".mandatory-terms", null);
    264266        Config.getPref().putList(prefix + ".forbidden-terms", null);
    265         assertNull(UploadAction.validateUploadTag("foo", prefix));
     267        assertNull(UploadAction.validateUploadTag("foo", prefix, def, def));
    266268
    267269        Config.getPref().putList(prefix + ".mandatory-terms", Arrays.asList("foo"));
    268         assertNull(UploadAction.validateUploadTag("foo", prefix));
     270        assertNull(UploadAction.validateUploadTag("foo", prefix, def, def));
    269271        assertEquals("The following required terms are missing: [foo]",
    270                 UploadAction.validateUploadTag("bar", prefix));
     272                UploadAction.validateUploadTag("bar", prefix, def, def));
    271273
    272274        Config.getPref().putList(prefix + ".forbidden-terms", Arrays.asList("bar"));
    273         assertNull(UploadAction.validateUploadTag("foo", prefix));
     275        assertNull(UploadAction.validateUploadTag("foo", prefix, def, def));
    274276        assertEquals("The following forbidden terms have been found: [bar]",
    275                 UploadAction.validateUploadTag("foobar", prefix));
     277                UploadAction.validateUploadTag("foobar", prefix, def, def));
     278        assertEquals("The following forbidden terms have been found: [bar]",
     279                UploadAction.validateUploadTag("FOOBAR", prefix, def, def));
    276280    }
    277281
Note: See TracChangeset for help on using the changeset viewer.