Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.gui.tagging.presets.items;
|
---|
3 |
|
---|
4 | import static org.junit.jupiter.api.Assertions.assertEquals;
|
---|
5 | import static org.junit.jupiter.api.Assertions.assertFalse;
|
---|
6 |
|
---|
7 | import java.util.Collections;
|
---|
8 |
|
---|
9 | import javax.swing.JPanel;
|
---|
10 |
|
---|
11 | import org.junit.jupiter.api.BeforeAll;
|
---|
12 | import org.junit.jupiter.api.Test;
|
---|
13 | import org.openstreetmap.josm.JOSMFixture;
|
---|
14 | import org.openstreetmap.josm.data.osm.OsmPrimitive;
|
---|
15 |
|
---|
16 | /**
|
---|
17 | * Unit tests of {@link Key} class.
|
---|
18 | */
|
---|
19 | class KeyTest {
|
---|
20 |
|
---|
21 | /**
|
---|
22 | * Setup test.
|
---|
23 | */
|
---|
24 | @BeforeAll
|
---|
25 | public static void setUp() {
|
---|
26 | JOSMFixture.createUnitTestFixture().init();
|
---|
27 | }
|
---|
28 |
|
---|
29 | /**
|
---|
30 | * Unit test for {@link Key#addToPanel}.
|
---|
31 | */
|
---|
32 | @Test
|
---|
33 | void testAddToPanel() {
|
---|
34 | JPanel p = new JPanel();
|
---|
35 | assertEquals(0, p.getComponentCount());
|
---|
36 | assertFalse(new Key().addToPanel(p, Collections.<OsmPrimitive>emptyList(), false));
|
---|
37 | assertEquals(0, p.getComponentCount());
|
---|
38 | }
|
---|
39 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.