Changeset 7307 in josm for trunk/test


Ignore:
Timestamp:
2014-07-12T17:35:30+02:00 (10 years ago)
Author:
Don-vip
Message:

see #10239 - fix unit test

File:
1 edited

Legend:

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

    r7112 r7307  
    8080    }
    8181
     82    /**
     83     * Tests formatting of relation names.
     84     */
    8285    @Test
    83     public void testRelationName() throws Exception {
     86    public void testRelationName() {
    8487        assertThat(getFormattedRelationName("X=Y"), is("relation (0, 0 members)"));
    8588        assertThat(getFormattedRelationName("name=Foo"), is("relation (\"Foo\", 0 members)"));
     
    9194    }
    9295
     96    /**
     97     * Tests formatting of way names.
     98     */
    9399    @Test
    94     public void testWayName() throws Exception {
     100    public void testWayName() {
    95101        assertThat(getFormattedWayName("building=yes"), is("building (0 nodes)"));
    96102        assertThat(getFormattedWayName("building=yes addr:housenumber=123"), is("House number 123 (0 nodes)"));
     
    100106
    101107    static String getFormattedRelationName(String tagsString) {
    102         return DefaultNameFormatter.getInstance().format((Relation) TestUtils.createPrimitive("relation " + tagsString));
     108        return DefaultNameFormatter.getInstance().format((Relation) TestUtils.createPrimitive("relation " + tagsString))
     109                .replace("\u200E", "").replace("\u200F", "");
    103110    }
    104111
    105112    static String getFormattedWayName(String tagsString) {
    106         return DefaultNameFormatter.getInstance().format((Way) TestUtils.createPrimitive("way " + tagsString));
     113        return DefaultNameFormatter.getInstance().format((Way) TestUtils.createPrimitive("way " + tagsString))
     114                .replace("\u200E", "").replace("\u200F", "");
    107115    }
    108116}
Note: See TracChangeset for help on using the changeset viewer.