source: josm/trunk/test/unit/org/openstreetmap/josm/data/validation/tests/UntaggedNodeTest.java@ 9666

Last change on this file since 9666 was 9666, checked in by stoecker, 8 years ago

see #12410 fix style of tests

File size: 1.4 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.InputStream;
8
9import org.junit.Before;
10import org.junit.Test;
11import org.openstreetmap.josm.JOSMFixture;
12import org.openstreetmap.josm.TestUtils;
13import org.openstreetmap.josm.data.osm.DataSet;
14import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
15import org.openstreetmap.josm.io.OsmReader;
16
17/**
18 * Unit tests of {@code UntaggedNode} class.
19 */
20public class UntaggedNodeTest {
21
22 private UntaggedNode test;
23
24 /**
25 * Setup test.
26 */
27 @Before
28 public void setUp() {
29 JOSMFixture.createUnitTestFixture().init();
30 test = new UntaggedNode();
31 }
32
33 /**
34 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/12436">Bug #12436</a>.
35 * @throws Exception if an error occurs
36 */
37 @Test
38 public void testTicket12436() throws Exception {
39 test.initialize();
40 test.startTest(null);
41 try (InputStream fis = TestUtils.getRegressionDataStream(12436, "example.osm")) {
42 final DataSet ds = OsmReader.parseDataSet(fis, NullProgressMonitor.INSTANCE);
43 test.visit(ds.allPrimitives());
44 test.endTest();
45 assertThat(test.getErrors(), isEmpty());
46 }
47 }
48}
Note: See TracBrowser for help on using the repository browser.