Last change
on this file since 10054 was 10054, checked in by Don-vip, 8 years ago |
fix unit test
|
-
Property svn:eol-style
set to
native
|
File size:
987 bytes
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.io;
|
---|
3 |
|
---|
4 | import static org.junit.Assert.assertNull;
|
---|
5 | import static org.junit.Assert.assertTrue;
|
---|
6 |
|
---|
7 | import java.io.File;
|
---|
8 |
|
---|
9 | import org.junit.Test;
|
---|
10 | import org.openstreetmap.josm.Main;
|
---|
11 | import org.openstreetmap.josm.TestUtils;
|
---|
12 | import org.openstreetmap.josm.gui.layer.Layer;
|
---|
13 |
|
---|
14 | /**
|
---|
15 | * Unit tests of {@link NoteImporter} class.
|
---|
16 | */
|
---|
17 | public class NoteImporterTest {
|
---|
18 |
|
---|
19 | /**
|
---|
20 | * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/12531">Bug #12531</a>.
|
---|
21 | */
|
---|
22 | @Test
|
---|
23 | public void testTicket12531() {
|
---|
24 | if (Main.map != null) {
|
---|
25 | for (Layer l: Main.map.mapView.getAllLayers()) {
|
---|
26 | Main.map.mapView.removeLayer(l);
|
---|
27 | }
|
---|
28 | Main.main.setMapFrame(null);
|
---|
29 | }
|
---|
30 | assertNull(Main.map);
|
---|
31 | assertTrue(new NoteImporter().importDataHandleExceptions(
|
---|
32 | new File(TestUtils.getRegressionDataFile(12531, "notes.osn")), null));
|
---|
33 | }
|
---|
34 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.