Last change
on this file was 18870, checked in by taylor.smock, 5 months ago |
See #16567: Update to JUnit 5
This converts most tests to use @Annotations. There are also some performance
improvements as it relates to tests.
|
-
Property svn:eol-style
set to
native
|
File size:
1.2 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.gui.preferences.imagery;
|
---|
3 |
|
---|
4 | import static org.junit.jupiter.api.Assertions.assertNotNull;
|
---|
5 |
|
---|
6 | import java.io.File;
|
---|
7 | import java.util.Collections;
|
---|
8 |
|
---|
9 | import org.junit.jupiter.api.Test;
|
---|
10 | import org.openstreetmap.josm.TestUtils;
|
---|
11 | import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
|
---|
12 | import org.openstreetmap.josm.spi.preferences.Config;
|
---|
13 | import org.openstreetmap.josm.testutils.annotations.Main;
|
---|
14 |
|
---|
15 | /**
|
---|
16 | * Unit tests of {@link ImageryPreference} class.
|
---|
17 | */
|
---|
18 | @Main
|
---|
19 | class ImageryPreferenceTest {
|
---|
20 | /**
|
---|
21 | * Unit test of {@link ImageryPreference#ImageryPreference}.
|
---|
22 | */
|
---|
23 | @Test
|
---|
24 | void testImageryPreference() {
|
---|
25 | assertNotNull(new ImageryPreference.Factory().createPreferenceSetting());
|
---|
26 | }
|
---|
27 |
|
---|
28 | /**
|
---|
29 | * Unit test of {@link ImageryPreference#addGui}.
|
---|
30 | */
|
---|
31 | @Test
|
---|
32 | void testAddGui() {
|
---|
33 | String fileUrl = new File(TestUtils.getTestDataRoot()+"__files/imagery/maps.xml").toURI().toString();
|
---|
34 | Config.getPref().putList("imagery.layers.sites", Collections.singletonList(fileUrl));
|
---|
35 | PreferencesTestUtils.doTestPreferenceSettingAddGui(new ImageryPreference.Factory(), null);
|
---|
36 | }
|
---|
37 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.