Ticket #17529: 17529_autotest_patch.diff

File 17529_autotest_patch.diff, 1.1 KB (added by openbrian, 7 years ago)
  • test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpReaderTest.java

     
    103103            }
    104104        }
    105105    }
     106    /**
     107     * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/13843">#13843</a>
     108     * @throws Exception if an error occurs during reading
     109     */
     110    @Test
     111    public void testTicket17529() throws Exception {
     112        // There is only 1 feature in this data set.
     113        File file = new File(TestUtils.getRegressionDataFile(17529, "west_webmerc.shp"));
     114        try (InputStream is = new FileInputStream(file)) {
     115            Collection<Way> ways = ShpReader.parseDataSet(is, file, null, null).getWays();
     116            assertFalse(ways.isEmpty());
     117            Way way = ways.iterator().next();
     118            assertEquals("Westminster city", way.get("NAMELSAD"));
     119        }
     120    }
    106121}