Ignore:
Timestamp:
2019-02-24T20:31:40+01:00 (6 years ago)
Author:
donvip
Message:

fix #josm13843 - Not properly loading attributes from multipart objects (patch by openbrian)

Location:
applications/editors/josm/plugins/opendata/test
Files:
5 added
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpReaderTest.java

    r34153 r34898  
    22package org.openstreetmap.josm.plugins.opendata.core.io.geographic;
    33
     4import static org.junit.Assert.assertEquals;
    45import static org.junit.Assert.assertFalse;
    56import static org.junit.Assert.assertNotNull;
     
    910import java.io.FileInputStream;
    1011import java.io.InputStream;
     12import java.util.Collection;
    1113
    1214import org.junit.Ignore;
     
    1618import org.openstreetmap.josm.data.coor.LatLon;
    1719import org.openstreetmap.josm.data.osm.Node;
     20import org.openstreetmap.josm.data.osm.Way;
    1821import org.openstreetmap.josm.plugins.opendata.core.io.NonRegFunctionalTests;
    1922import org.openstreetmap.josm.testutils.JOSMTestRules;
     
    8588        }
    8689    }
     90
     91    /**
     92     * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/12843">#12843</a>
     93     * @throws Exception if an error occurs during reading
     94     */
     95    @Test
     96    public void testTicket12843() throws Exception {
     97        File file = new File(TestUtils.getRegressionDataFile(12843, "test.shp"));
     98        try (InputStream is = new FileInputStream(file)) {
     99            Collection<Way> ways = ShpReader.parseDataSet(is, file, null, null).getWays();
     100            assertFalse(ways.isEmpty());
     101            for (Way way : ways) {
     102                assertEquals("Test", way.get("name"));
     103            }
     104        }
     105    }
    87106}
Note: See TracChangeset for help on using the changeset viewer.