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
|
Rev | Line | |
---|
[9666] | 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 |
|
---|
[12557] | 6 | import java.io.File;
|
---|
| 7 | import java.util.Arrays;
|
---|
| 8 |
|
---|
[10977] | 9 | import org.junit.Rule;
|
---|
[9666] | 10 | import org.junit.Test;
|
---|
[12557] | 11 | import org.openstreetmap.josm.Main;
|
---|
| 12 | import org.openstreetmap.josm.TestUtils;
|
---|
[9666] | 13 | import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
|
---|
[10977] | 14 | import org.openstreetmap.josm.testutils.JOSMTestRules;
|
---|
[9666] | 15 |
|
---|
[10977] | 16 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
---|
| 17 |
|
---|
[9666] | 18 | /**
|
---|
| 19 | * Unit tests of {@link ImageryPreference} class.
|
---|
| 20 | */
|
---|
| 21 | public class ImageryPreferenceTest {
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
[10977] | 24 | * Setup tests
|
---|
[9666] | 25 | */
|
---|
[10977] | 26 | @Rule
|
---|
| 27 | @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
---|
[12557] | 28 | public JOSMTestRules test = new JOSMTestRules().platform().mainMenu();
|
---|
[9666] | 29 |
|
---|
| 30 | /**
|
---|
| 31 | * Unit test of {@link ImageryPreference#ImageryPreference}.
|
---|
| 32 | */
|
---|
| 33 | @Test
|
---|
[10378] | 34 | public void testImageryPreference() {
|
---|
[9666] | 35 | assertNotNull(new ImageryPreference.Factory().createPreferenceSetting());
|
---|
| 36 | }
|
---|
| 37 |
|
---|
| 38 | /**
|
---|
| 39 | * Unit test of {@link ImageryPreference#addGui}.
|
---|
| 40 | */
|
---|
| 41 | @Test
|
---|
| 42 | public void testAddGui() {
|
---|
[12557] | 43 | String fileUrl = new File(TestUtils.getTestDataRoot()+"__files/imagery/maps.xml").toURI().toString();
|
---|
| 44 | Main.pref.putCollection("imagery.layers.sites", Arrays.asList(fileUrl));
|
---|
[9973] | 45 | PreferencesTestUtils.doTestPreferenceSettingAddGui(new ImageryPreference.Factory(), null);
|
---|
[9666] | 46 | }
|
---|
| 47 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.