Changeset 16328 in josm for trunk/test/unit/org


Ignore:
Timestamp:
2020-04-17T21:27:35+02:00 (5 years ago)
Author:
simon04
Message:

AddTagsDialog: use TextTagParser.readTagsByRegexp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/AddTagsDialogTest.java

    r16327 r16328  
    44import static org.junit.Assert.assertEquals;
    55
    6 import java.util.Arrays;
     6import java.util.Map;
    77
     8import org.junit.Rule;
    89import org.junit.Test;
     10import org.openstreetmap.josm.testutils.JOSMTestRules;
     11
     12import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    913
    1014/**
     
    1216 */
    1317public class AddTagsDialogTest {
     18    /**
     19     * Setup test.
     20     */
     21    @Rule
     22    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     23    public JOSMTestRules test = new JOSMTestRules().preferences();
    1424
    1525    /**
     
    1828    @Test
    1929    public void testParseUrlTagsToKeyValues() {
    20         String[][] strings = AddTagsDialog.parseUrlTagsToKeyValues("wikipedia:de=Residenzschloss Dresden|name:en=Dresden Castle");
    21         assertEquals("[[wikipedia:de, Residenzschloss Dresden], [name:en, Dresden Castle]]", Arrays.deepToString(strings));
     30        Map<String, String> strings = AddTagsDialog.parseUrlTagsToKeyValues("wikipedia:de=Residenzschloss Dresden|name:en=Dresden Castle");
     31        assertEquals(2, strings.size());
     32        assertEquals("Residenzschloss Dresden", strings.get("wikipedia:de"));
     33        assertEquals("Dresden Castle", strings.get("name:en"));
    2234    }
    2335}
Note: See TracChangeset for help on using the changeset viewer.