Last change
on this file since 15702 was 14689, checked in by simon04, 5 years ago |
fix #17202 - InputMapUtils: display Ctrl+Enter in action tooltip
|
File size:
874 bytes
|
Rev | Line | |
---|
[14689] | 1 | // License: GPL. For details, see LICENSE file.
|
---|
| 2 | package org.openstreetmap.josm.tools;
|
---|
| 3 |
|
---|
| 4 | import static org.junit.Assert.assertEquals;
|
---|
| 5 |
|
---|
| 6 | import java.awt.event.InputEvent;
|
---|
| 7 | import java.awt.event.KeyEvent;
|
---|
| 8 |
|
---|
| 9 | import javax.swing.KeyStroke;
|
---|
| 10 |
|
---|
| 11 | import org.junit.BeforeClass;
|
---|
| 12 | import org.junit.Test;
|
---|
| 13 | import org.openstreetmap.josm.JOSMFixture;
|
---|
| 14 |
|
---|
| 15 | /**
|
---|
| 16 | * Unit tests of {@link Shortcut} class.
|
---|
| 17 | */
|
---|
| 18 | public class ShortcutTest {
|
---|
| 19 |
|
---|
| 20 | /**
|
---|
| 21 | * Setup test.
|
---|
| 22 | */
|
---|
| 23 | @BeforeClass
|
---|
| 24 | public static void setUp() {
|
---|
| 25 | JOSMFixture.createUnitTestFixture().init();
|
---|
| 26 | }
|
---|
| 27 |
|
---|
| 28 | /**
|
---|
| 29 | * Test method for {@code Shortcut#makeTooltip}
|
---|
| 30 | */
|
---|
| 31 | @Test
|
---|
| 32 | public void testMakeTooltip() {
|
---|
| 33 | assertEquals("<html>Foo Bar <font size='-2'>(Shift+J)</font> </html>",
|
---|
| 34 | Shortcut.makeTooltip("Foo Bar", KeyStroke.getKeyStroke(KeyEvent.VK_J, InputEvent.SHIFT_DOWN_MASK)));
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.