source: josm/trunk/test/unit/org/openstreetmap/josm/actions/SessionLoadActionTest.java@ 17360

Last change on this file since 17360 was 17275, checked in by Don-vip, 3 years ago

see #16567 - upgrade almost all tests to JUnit 5, except those depending on WiremockRule

See https://github.com/tomakehurst/wiremock/issues/684

  • Property svn:eol-style set to native
File size: 1.3 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.actions;
3
4import static org.junit.jupiter.api.Assertions.assertFalse;
5
6import org.junit.jupiter.api.extension.RegisterExtension;
7import org.junit.jupiter.api.Test;
8import org.openstreetmap.josm.data.imagery.ImageryInfo;
9import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryType;
10import org.openstreetmap.josm.gui.layer.TMSLayer;
11import org.openstreetmap.josm.testutils.JOSMTestRules;
12
13import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
14
15/**
16 * Unit tests for class {@link SessionLoadAction}.
17 */
18class 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}
Note: See TracBrowser for help on using the repository browser.