Changeset 32130 in osm for applications/editors/josm/plugins/opendata/test/unit/org
- Timestamp:
- 2016-03-27T23:17:02+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/KmlReaderTest.java
r31990 r32130 2 2 package org.openstreetmap.josm.plugins.opendata.core.io.geographic; 3 3 4 import java.io.File; 5 import java.io.FileInputStream; 4 import static org.junit.Assert.assertFalse; 5 import static org.junit.Assert.assertTrue; 6 6 7 import java.io.IOException; 7 8 import java.io.InputStream; … … 28 29 JOSMFixture.createUnitTestFixture().init(); 29 30 } 31 32 /** 33 * Unit test of {@link KmlReader#COLOR_PATTERN} 34 */ 35 @Test 36 public void testColorPattern() { 37 assertTrue(KmlReader.COLOR_PATTERN.matcher("00112233").matches()); 38 assertTrue(KmlReader.COLOR_PATTERN.matcher("44556677").matches()); 39 assertTrue(KmlReader.COLOR_PATTERN.matcher("8899aabb").matches()); 40 assertTrue(KmlReader.COLOR_PATTERN.matcher("CCDDEEFF").matches()); 41 assertFalse(KmlReader.COLOR_PATTERN.matcher("0011223").matches()); 42 assertFalse(KmlReader.COLOR_PATTERN.matcher("001122330").matches()); 43 assertFalse(KmlReader.COLOR_PATTERN.matcher("gg112233").matches()); 44 assertFalse(KmlReader.COLOR_PATTERN.matcher("red").matches()); 45 assertFalse(KmlReader.COLOR_PATTERN.matcher("yellow").matches()); 46 } 30 47 48 /** 49 * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/12694">#12694</a> 50 * @throws IOException if an error occurs during reading 51 */ 52 @Test 53 public void testTicket12694() throws IOException, XMLStreamException, FactoryConfigurationError { 54 try (InputStream is = TestUtils.getRegressionDataStream(12694, "Alvinรณpolis_314946.kml")) { 55 NonRegFunctionalTests.testGeneric("#12694", KmlReader.parseDataSet(is, null)); 56 } 57 } 58 31 59 /** 32 60 * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/10214">#10214</a> … … 39 67 } 40 68 } 41 69 42 70 /** 43 71 * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/7714">#7714</a>
Note:
See TracChangeset
for help on using the changeset viewer.