Changeset 33156 in osm for applications/editors/josm/plugins/opendata/test
- Timestamp:
- 2017-02-25T01:26:42+01:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/opendata/test
- Files:
-
- 6 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/NonRegFunctionalTests.java
r30575 r33156 24 24 25 25 public abstract class NonRegFunctionalTests { 26 26 27 27 /** 28 28 * Non-regression generic test. … … 38 38 assertTrue("Node without coordinate found for "+context, latlon != null); 39 39 assertTrue("Node with invalid coordinate ("+latlon+") found for "+context, latlon.isValid()); 40 assertFalse("Node with outside world coordinate ("+latlon+") found for "+context, latlon.isOutSideWorld()); 40 41 } 41 42 // and no empty ways … … 48 49 } 49 50 } 50 51 51 52 /** 52 53 * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/10214">#10214</a> … … 65 66 assertTrue(found); 66 67 } 67 68 68 69 /** 69 70 * Lists all datasets files matching given extension. … … 77 78 return result; 78 79 } 79 80 80 81 static void addTree(Path directory, Collection<Path> all, String ext) throws IOException { 81 82 try (DirectoryStream<Path> ds = Files.newDirectoryStream(directory)) { -
applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/archive/ZipReaderTest.java
r32901 r33156 24 24 */ 25 25 @Rule 26 public JOSMTestRules rules = new JOSMTestRules().preferences(). noTimeout();26 public JOSMTestRules rules = new JOSMTestRules().preferences().projection().noTimeout(); 27 27 28 28 /** -
applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GmlReaderTest.java
r33051 r33156 28 28 */ 29 29 @Rule 30 public JOSMTestRules rules = new JOSMTestRules().preferences(). timeout(60000);30 public JOSMTestRules rules = new JOSMTestRules().preferences().projection().timeout(60000); 31 31 32 32 /** -
applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/KmlReaderTest.java
r32355 r33156 26 26 */ 27 27 @Rule 28 public JOSMTestRules rules = new JOSMTestRules().preferences() ;28 public JOSMTestRules rules = new JOSMTestRules().preferences().projection(); 29 29 30 30 /** … … 43 43 assertFalse(KmlReader.COLOR_PATTERN.matcher("yellow").matches()); 44 44 } 45 45 46 46 /** 47 47 * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/12694">#12694</a> -
applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/MifReaderTest.java
r32545 r33156 25 25 */ 26 26 @Rule 27 public JOSMTestRules rules = new JOSMTestRules().preferences() ;27 public JOSMTestRules rules = new JOSMTestRules().preferences().projection(); 28 28 29 29 private static AbstractDataSetHandler newHandler(final String epsgCode) { -
applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpReaderTest.java
r32545 r33156 2 2 package org.openstreetmap.josm.plugins.opendata.core.io.geographic; 3 3 4 import static org.junit.Assert.assertFalse; 4 5 import static org.junit.Assert.assertNotNull; 6 import static org.junit.Assert.assertTrue; 5 7 6 8 import java.io.File; … … 12 14 import javax.xml.stream.XMLStreamException; 13 15 16 import org.junit.Ignore; 14 17 import org.junit.Rule; 15 18 import org.junit.Test; 16 19 import org.openstreetmap.josm.TestUtils; 20 import org.openstreetmap.josm.data.coor.LatLon; 17 21 import org.openstreetmap.josm.data.osm.Node; 18 22 import org.openstreetmap.josm.plugins.opendata.core.io.NonRegFunctionalTests; … … 28 32 */ 29 33 @Rule 30 public JOSMTestRules rules = new JOSMTestRules().preferences(). timeout(60000);34 public JOSMTestRules rules = new JOSMTestRules().preferences().projection().timeout(60000); 31 35 32 36 /** … … 40 44 for (Node n : ShpReader.parseDataSet(is, file, null, null).getNodes()) { 41 45 assertNotNull(n.toString(), n.getCoor()); 46 } 47 } 48 } 49 50 /** 51 * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/11761">#11761</a> 52 * @throws IOException if an error occurs during reading 53 */ 54 @Test 55 @Ignore("work in progress") 56 public void testTicket11761() throws IOException, XMLStreamException, FactoryConfigurationError { 57 File file = new File(TestUtils.getRegressionDataFile(11761, "HAR.shp")); 58 try (InputStream is = new FileInputStream(file)) { 59 for (Node n : ShpReader.parseDataSet(is, file, null, null).getNodes()) { 60 assertNotNull(n.toString(), n.getCoor()); 61 assertFalse(n.toString(), LatLon.ZERO.equals(n.getCoor())); 62 assertFalse(n.toString(), n.getCoor().isOutSideWorld()); 63 assertTrue(n.toString(), n.getCoor().isValid()); 42 64 } 43 65 } -
applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/tabular/CsvReaderTest.java
r32898 r33156 28 28 */ 29 29 @Rule 30 public JOSMTestRules rules = new JOSMTestRules().preferences() ;30 public JOSMTestRules rules = new JOSMTestRules().preferences().projection(); 31 31 32 32 private static AbstractDataSetHandler newHandler(final String epsgCode) { -
applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/tabular/OdsReaderTest.java
r33049 r33156 23 23 */ 24 24 @Rule 25 public JOSMTestRules rules = new JOSMTestRules().preferences() ;25 public JOSMTestRules rules = new JOSMTestRules().preferences().projection(); 26 26 27 27 /**
Note:
See TracChangeset
for help on using the changeset viewer.