source: josm/trunk/test/unit/org/openstreetmap/josm/io/NoteImporterTest.java@ 11974

Last change on this file since 11974 was 10432, checked in by Don-vip, 8 years ago

fix #13001 - Add MainPanel + some new methods (patch by michael2402, modified) - gsoc-core

  • Property svn:eol-style set to native
File size: 1007 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.io;
3
4import static org.junit.Assert.assertNull;
5import static org.junit.Assert.assertTrue;
6
7import java.io.File;
8
9import org.junit.Rule;
10import org.junit.Test;
11import org.openstreetmap.josm.Main;
12import org.openstreetmap.josm.TestUtils;
13import org.openstreetmap.josm.testutils.JOSMTestRules;
14
15/**
16 * Unit tests of {@link NoteImporter} class.
17 */
18public class NoteImporterTest {
19
20 /**
21 * Use the test rules to remove any layers and reset state.
22 */
23 @Rule
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 public void testTicket12531() {
31 Main.getLayerManager().resetState();
32 assertNull(Main.map);
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.