Changeset 14165 in josm for trunk/test/unit


Ignore:
Timestamp:
2018-08-19T04:34:42+02:00 (6 years ago)
Author:
Don-vip
Message:

fix #16652 - validator dialog: display multiple OSM primitives like in other dialogs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/validation/util/MultipleNameVisitorTest.java

    r10962 r14165  
    88import org.junit.Rule;
    99import org.junit.Test;
     10import org.openstreetmap.josm.TestUtils;
    1011import org.openstreetmap.josm.data.osm.Way;
    1112import org.openstreetmap.josm.testutils.JOSMTestRules;
     
    3233        MultipleNameVisitor visitor = new MultipleNameVisitor();
    3334        visitor.visit(Arrays.asList(new Way(), new Way()));
    34         assertEquals("2 ways", visitor.toString());
     35        assertEquals("2 ways: ‎0‎ (0 nodes), ‎0‎ (0 nodes)", visitor.toString());
     36    }
     37
     38    /**
     39     * Non-regression test for bug #16652.
     40     */
     41    @Test
     42    public void testTicket16652() {
     43        MultipleNameVisitor visitor = new MultipleNameVisitor();
     44        visitor.visit(Arrays.asList(
     45                TestUtils.newNode("name=foo"),
     46                TestUtils.newWay("addr:housename=Stark"),
     47                TestUtils.newRelation("type=route")));
     48        assertEquals("3 objects: foo, ‎House Stark‎ (0 nodes), route (0, 0 members)", visitor.toString());
    3549    }
    3650}
Note: See TracChangeset for help on using the changeset viewer.