Changeset 7307 in josm for trunk/test/unit/org
- Timestamp:
- 2014-07-12T17:35:30+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/DefaultNameFormatterTest.java
r7112 r7307 80 80 } 81 81 82 /** 83 * Tests formatting of relation names. 84 */ 82 85 @Test 83 public void testRelationName() throws Exception{86 public void testRelationName() { 84 87 assertThat(getFormattedRelationName("X=Y"), is("relation (0, 0 members)")); 85 88 assertThat(getFormattedRelationName("name=Foo"), is("relation (\"Foo\", 0 members)")); … … 91 94 } 92 95 96 /** 97 * Tests formatting of way names. 98 */ 93 99 @Test 94 public void testWayName() throws Exception{100 public void testWayName() { 95 101 assertThat(getFormattedWayName("building=yes"), is("building (0 nodes)")); 96 102 assertThat(getFormattedWayName("building=yes addr:housenumber=123"), is("House number 123 (0 nodes)")); … … 100 106 101 107 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", ""); 103 110 } 104 111 105 112 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", ""); 107 115 } 108 116 }
Note:
See TracChangeset
for help on using the changeset viewer.