1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.actions;
|
---|
3 |
|
---|
4 | import static org.junit.jupiter.api.Assertions.assertFalse;
|
---|
5 |
|
---|
6 | import org.junit.jupiter.api.extension.RegisterExtension;
|
---|
7 | import org.junit.jupiter.api.Test;
|
---|
8 | import org.openstreetmap.josm.data.imagery.ImageryInfo;
|
---|
9 | import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryType;
|
---|
10 | import org.openstreetmap.josm.gui.layer.TMSLayer;
|
---|
11 | import org.openstreetmap.josm.testutils.JOSMTestRules;
|
---|
12 |
|
---|
13 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
---|
14 |
|
---|
15 | /**
|
---|
16 | * Unit tests for class {@link SessionLoadAction}.
|
---|
17 | */
|
---|
18 | class SessionLoadActionTest {
|
---|
19 |
|
---|
20 | /**
|
---|
21 | * Setup test.
|
---|
22 | */
|
---|
23 | @RegisterExtension
|
---|
24 | @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
---|
25 | public JOSMTestRules test = new JOSMTestRules().main().projection();
|
---|
26 |
|
---|
27 | /**
|
---|
28 | * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/17702">Bug #17702</a>.
|
---|
29 | */
|
---|
30 | @Test
|
---|
31 | void testTicket17702() {
|
---|
32 | assertFalse(SessionLoadAction.Loader.addLayer(new TMSLayer(new ImageryInfo(
|
---|
33 | "Bing Карта (GLOBALCITY)",
|
---|
34 | "http://ecn.dynamic.t{switch:1,2,3}.tiles.virtualearth.net/comp/ch/{$q}?mkt=en-us&it=G,VE,BX,L,LA&shading=hill&og=2&n=z",
|
---|
35 | ImageryType.TMS.getTypeString(), null, null))));
|
---|
36 | }
|
---|
37 | }
|
---|