Last change
on this file since 12557 was 12557, checked in by Don-vip, 7 years ago |
see #15102 - first batch of HTTP unit tests mocking, using WireMock 2.7.1
|
-
Property svn:eol-style
set to
native
|
File size:
1.4 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.gui.preferences.imagery;
|
---|
3 |
|
---|
4 | import static org.junit.Assert.assertNotNull;
|
---|
5 |
|
---|
6 | import java.io.File;
|
---|
7 | import java.util.Arrays;
|
---|
8 |
|
---|
9 | import org.junit.Rule;
|
---|
10 | import org.junit.Test;
|
---|
11 | import org.openstreetmap.josm.Main;
|
---|
12 | import org.openstreetmap.josm.TestUtils;
|
---|
13 | import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
|
---|
14 | import org.openstreetmap.josm.testutils.JOSMTestRules;
|
---|
15 |
|
---|
16 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
---|
17 |
|
---|
18 | /**
|
---|
19 | * Unit tests of {@link ImageryPreference} class.
|
---|
20 | */
|
---|
21 | public class ImageryPreferenceTest {
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * Setup tests
|
---|
25 | */
|
---|
26 | @Rule
|
---|
27 | @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
---|
28 | public JOSMTestRules test = new JOSMTestRules().platform().mainMenu();
|
---|
29 |
|
---|
30 | /**
|
---|
31 | * Unit test of {@link ImageryPreference#ImageryPreference}.
|
---|
32 | */
|
---|
33 | @Test
|
---|
34 | public void testImageryPreference() {
|
---|
35 | assertNotNull(new ImageryPreference.Factory().createPreferenceSetting());
|
---|
36 | }
|
---|
37 |
|
---|
38 | /**
|
---|
39 | * Unit test of {@link ImageryPreference#addGui}.
|
---|
40 | */
|
---|
41 | @Test
|
---|
42 | public void testAddGui() {
|
---|
43 | String fileUrl = new File(TestUtils.getTestDataRoot()+"__files/imagery/maps.xml").toURI().toString();
|
---|
44 | Main.pref.putCollection("imagery.layers.sites", Arrays.asList(fileUrl));
|
---|
45 | PreferencesTestUtils.doTestPreferenceSettingAddGui(new ImageryPreference.Factory(), null);
|
---|
46 | }
|
---|
47 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.