Changeset 13162 in josm for trunk/test
- Timestamp:
- 2017-11-25T17:20:10+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/layer/NoteLayerTest.java
r13122 r13162 56 56 // CHECKSTYLE.ON: LineLength 57 57 } 58 59 /** 60 * Unit test of {@link NoteLayer#replaceLinks}. 61 */ 62 @Test 63 public void testReplaceLinks() { 64 // empty string 65 assertEquals("", NoteLayer.replaceLinks("")); 66 // no link 67 assertEquals("no http link", NoteLayer.replaceLinks("no http link")); 68 // just one link 69 assertEquals("<a href=\"https://www.example.com/test\">https://www.example.com/\u200btest</a>", 70 NoteLayer.replaceLinks("https://www.example.com/test")); 71 // CHECKSTYLE.OFF: LineLength 72 // text with several links (with and without slash) 73 assertEquals("foo <a href=\"https://foo.example.com/test\">https://foo.example.com/\u200btest</a> bar <a href=\"https://bar.example.com\">https://bar.example.com</a> baz", 74 NoteLayer.replaceLinks("foo https://foo.example.com/test bar https://bar.example.com baz")); 75 // CHECKSTYLE.ON: LineLength 76 } 58 77 }
Note:
See TracChangeset
for help on using the changeset viewer.