source: josm/trunk/test/unit/org/openstreetmap/josm/data/validation/tests/UnconnectedWaysTest.java@ 7081

Last change on this file since 7081 was 7081, checked in by Don-vip, 10 years ago

fixes for unit tests

File size: 1.2 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.validation.tests;
3
4import static org.CustomMatchers.isEmpty;
5import static org.junit.Assert.assertThat;
6
7import java.io.FileInputStream;
8import java.io.InputStream;
9
10import org.junit.Before;
11import org.junit.Test;
12import org.openstreetmap.josm.JOSMFixture;
13import org.openstreetmap.josm.data.osm.DataSet;
14import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
15import org.openstreetmap.josm.io.OsmReader;
16
17public class UnconnectedWaysTest {
18
19 UnconnectedWays bib;
20
21 /**
22 * Setup test.
23 */
24 @Before
25 public void setUp() throws Exception {
26 bib = new UnconnectedWays.UnconnectedHighways();
27 JOSMFixture.createUnitTestFixture().init();
28 bib.initialize();
29 bib.startTest(null);
30 }
31
32 @Test
33 public void testTicket6313() throws Exception {
34 try (InputStream fis = new FileInputStream("data_nodist/UnconnectedWaysTest.osm")) {
35 final DataSet ds = OsmReader.parseDataSet(fis, NullProgressMonitor.INSTANCE);
36 bib.visit(ds.allPrimitives());
37 bib.endTest();
38 assertThat(bib.getErrors(), isEmpty());
39 }
40 }
41}
Note: See TracBrowser for help on using the repository browser.