Ignore:
Timestamp:
2017-11-25T17:20:10+01:00 (6 years ago)
Author:
Don-vip
Message:

see #15550 - much better dynamic resizing of note tooltips

File:
1 edited

Legend:

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

    r13122 r13162  
    5656        // CHECKSTYLE.ON: LineLength
    5757    }
     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    }
    5877}
Note: See TracChangeset for help on using the changeset viewer.