Ignore:
Timestamp:
2016-03-06T22:42:46+01:00 (8 years ago)
Author:
Don-vip
Message:

fix problems seen in unit tests when launched manually from Eclipse

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/io/session/SessionReaderTest.java

    r9753 r9942  
    1414import org.junit.Test;
    1515import org.openstreetmap.josm.JOSMFixture;
     16import org.openstreetmap.josm.Main;
    1617import org.openstreetmap.josm.TestUtils;
    1718import org.openstreetmap.josm.gui.layer.GpxLayer;
     
    138139    @Test
    139140    public void testReadNotes() throws IOException, IllegalDataException {
     141        if (Main.isDisplayingMapView()) {
     142            for (NoteLayer nl : Main.map.mapView.getLayersOfType(NoteLayer.class)) {
     143                Main.map.mapView.removeLayer(nl);
     144            }
     145        }
    140146        final List<Layer> layers = testRead("notes.joz");
    141147        assertSame(layers.size(), 1);
Note: See TracChangeset for help on using the changeset viewer.