Changeset 13413 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2018-02-11T22:32:26+01:00 (7 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/TestUtils.java
r13300 r13413 260 260 261 261 /** 262 * Creates a new node with the given tags (see {@link OsmUtils#createPrimitive(java.lang.String)}) 263 * 264 * @param tags the tags to set 265 * @return a new node 266 */ 267 public static Node newNode(String tags) { 268 return (Node) OsmUtils.createPrimitive("node " + tags); 269 } 270 271 /** 262 272 * Creates a new way with the given tags (see {@link OsmUtils#createPrimitive(java.lang.String)}) and the nodes added 263 273 * -
trunk/test/unit/org/openstreetmap/josm/data/osm/DefaultNameFormatterTest.java
r12663 r13413 153 153 DefaultNameFormatter.getInstance().formatAsHtmlUnorderedList(nodes, 5)); 154 154 } 155 156 /** 157 * Test of {@link DefaultNameFormatter#buildDefaultToolTip(IPrimitive)}. 158 */ 159 @Test 160 public void testBuildDefaultToolTip() { 161 assertEquals("<html><strong>id</strong>=0<br>"+ 162 "<strong>name:en</strong>=foo<br>"+ 163 "<strong>tourism</strong>=hotel<br>"+ 164 "<strong>url</strong>=http://foo.bar<br>"+ 165 "<strong>xml</strong>=<tag/></html>", 166 DefaultNameFormatter.getInstance().buildDefaultToolTip( 167 TestUtils.newNode("tourism=hotel name:en=foo url=http://foo.bar xml=<tag/>"))); 168 } 155 169 }
Note:
See TracChangeset
for help on using the changeset viewer.