- Timestamp:
- 2015-10-23T00:06:17+02:00 (9 years ago)
- Location:
- trunk/test
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/actions/JoinAreasActionTest.java
r7937 r8930 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.actions; 3 4 import static org.junit.Assert.assertEquals; 3 5 4 6 import java.io.FileInputStream; … … 11 13 import org.openstreetmap.josm.Main; 12 14 import org.openstreetmap.josm.TestUtils; 15 import org.openstreetmap.josm.actions.search.SearchAction; 13 16 import org.openstreetmap.josm.data.osm.DataSet; 14 17 import org.openstreetmap.josm.gui.layer.OsmDataLayer; … … 43 46 } 44 47 } 48 49 /** 50 * Non-regression test for bug #11992. 51 * @throws IOException if any I/O error occurs 52 * @throws IllegalDataException if OSM parsing fails 53 */ 54 @Test 55 public void testTicket11992() throws IOException, IllegalDataException { 56 try (InputStream is = new FileInputStream(TestUtils.getRegressionDataFile(11992, "shapes.osm"))) { 57 DataSet ds = OsmReader.parseDataSet(is, null); 58 assertEquals(10, ds.getWays().size()); 59 Main.map.mapView.addLayer(new OsmDataLayer(ds, null, null)); 60 for (String ref : new String[]{"A", "B", "C", "D", "E"}) { 61 System.out.print("Joining ways " + ref); 62 SearchAction.search("type:way ref="+ref, SearchAction.SearchMode.replace); 63 assertEquals(2, ds.getSelectedWays().size()); 64 Main.main.menu.joinAreas.join(ds.getSelectedWays()); 65 assertEquals(1, ds.getSelectedWays().size()); 66 System.out.println(" ==> OK"); 67 } 68 } 69 } 45 70 }
Note:
See TracChangeset
for help on using the changeset viewer.