Last change
on this file was 18853, checked in by taylor.smock, 7 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:
1.0 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.gui.preferences.audio;
|
---|
3 |
|
---|
4 | import static org.junit.jupiter.api.Assertions.assertNotNull;
|
---|
5 |
|
---|
6 | import org.junit.jupiter.api.Test;
|
---|
7 | import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
|
---|
8 | import org.openstreetmap.josm.spi.preferences.Config;
|
---|
9 |
|
---|
10 | /**
|
---|
11 | * Unit tests of {@link AudioPreference} class.
|
---|
12 | */
|
---|
13 | class AudioPreferenceTest {
|
---|
14 | /**
|
---|
15 | * Unit test of {@link AudioPreference#AudioPreference}.
|
---|
16 | */
|
---|
17 | @Test
|
---|
18 | void testAudioPreference() {
|
---|
19 | assertNotNull(new AudioPreference.Factory().createPreferenceSetting());
|
---|
20 | }
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * Unit test of {@link AudioPreference#addGui}.
|
---|
24 | */
|
---|
25 | @Test
|
---|
26 | void testAddGui() {
|
---|
27 | Config.getPref().putBoolean("audio.menuinvisible", true);
|
---|
28 | PreferencesTestUtils.doTestPreferenceSettingAddGui(new AudioPreference.Factory(), null);
|
---|
29 | Config.getPref().putBoolean("audio.menuinvisible", false);
|
---|
30 | PreferencesTestUtils.doTestPreferenceSettingAddGui(new AudioPreference.Factory(), null);
|
---|
31 | }
|
---|
32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.