source: josm/trunk/test/unit/org/openstreetmap/josm/actions/JoinAreasActionTest.java@ 8513

Last change on this file since 8513 was 7937, checked in by bastiK, 9 years ago

add subversion property svn:eol=native

  • Property svn:eol-style set to native
File size: 1.4 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.actions;
3
4import java.io.FileInputStream;
5import java.io.IOException;
6import java.io.InputStream;
7
8import org.junit.BeforeClass;
9import org.junit.Test;
10import org.openstreetmap.josm.JOSMFixture;
11import org.openstreetmap.josm.Main;
12import org.openstreetmap.josm.TestUtils;
13import org.openstreetmap.josm.data.osm.DataSet;
14import org.openstreetmap.josm.gui.layer.OsmDataLayer;
15import org.openstreetmap.josm.io.IllegalDataException;
16import org.openstreetmap.josm.io.OsmReader;
17
18/**
19 * Unit tests of {@link JoinAreasAction} class.
20 */
21public class JoinAreasActionTest {
22
23 /**
24 * Setup test.
25 */
26 @BeforeClass
27 public static void setUp() {
28 JOSMFixture.createUnitTestFixture().init(true);
29 }
30
31 /**
32 * Non-regression test for bug #10511.
33 * @throws IOException if any I/O error occurs
34 * @throws IllegalDataException if OSM parsing fails
35 */
36 @Test
37 public void testTicket10511() throws IOException, IllegalDataException {
38 try (InputStream is = new FileInputStream(TestUtils.getRegressionDataFile(10511, "10511_mini.osm"))) {
39 DataSet ds = OsmReader.parseDataSet(is, null);
40 Main.map.mapView.addLayer(new OsmDataLayer(ds, null, null));
41 // FIXME enable this test after we fix the bug. Test disabled for now
42 // new JoinAreasAction().join(ds.getWays());
43 }
44 }
45}
Note: See TracBrowser for help on using the repository browser.