Last change
on this file since 18853 was 18853, checked in by taylor.smock, 8 months ago |
See #16567: Update to JUnit 5
This removes new JOSMTestRules() with no additional setup and most
JOSMFixture calls.
Removing the bare JOSMTestRules speeds up the test suite since there are two
fewer System.gc() calls per test.
|
-
Property svn:eol-style
set to
native
|
File size:
871 bytes
|
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 | import static org.junit.jupiter.api.Assertions.assertTrue;
|
---|
7 |
|
---|
8 | import javax.swing.JPanel;
|
---|
9 |
|
---|
10 | import org.junit.jupiter.api.Test;
|
---|
11 | import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetItemGuiSupport;
|
---|
12 |
|
---|
13 | /**
|
---|
14 | * Unit tests of {@link CheckGroup} class.
|
---|
15 | */
|
---|
16 | class CheckGroupTest {
|
---|
17 | /**
|
---|
18 | * Unit test for {@link CheckGroup#addToPanel}.
|
---|
19 | */
|
---|
20 | @Test
|
---|
21 | void testAddToPanel() {
|
---|
22 | CheckGroup cg = new CheckGroup();
|
---|
23 | JPanel p = new JPanel();
|
---|
24 | assertEquals(0, p.getComponentCount());
|
---|
25 | assertFalse(cg.addToPanel(p, TaggingPresetItemGuiSupport.create(false)));
|
---|
26 | assertTrue(p.getComponentCount() > 0);
|
---|
27 | }
|
---|
28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.