source: josm/trunk/test/unit/org/openstreetmap/josm/gui/io/importexport/NoteImporterTest.java@ 17548

Last change on this file since 17548 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.1 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.io.importexport;
3
4import static org.junit.jupiter.api.Assertions.assertNull;
5import static org.junit.jupiter.api.Assertions.assertTrue;
6
7import java.io.File;
8
9import org.junit.jupiter.api.extension.RegisterExtension;
10import org.junit.jupiter.api.Test;
11import org.openstreetmap.josm.TestUtils;
12import org.openstreetmap.josm.gui.MainApplication;
13import org.openstreetmap.josm.testutils.JOSMTestRules;
14
15/**
16 * Unit tests of {@link NoteImporter} class.
17 */
18class NoteImporterTest {
19
20 /**
21 * Use the test rules to remove any layers and reset state.
22 */
23 @RegisterExtension
24 public final JOSMTestRules rules = new JOSMTestRules();
25
26 /**
27 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/12531">Bug #12531</a>.
28 */
29 @Test
30 void testTicket12531() {
31 MainApplication.getLayerManager().resetState();
32 assertNull(MainApplication.getMap());
33 assertTrue(new NoteImporter().importDataHandleExceptions(
34 new File(TestUtils.getRegressionDataFile(12531, "notes.osn")), null));
35 }
36}
Note: See TracBrowser for help on using the repository browser.