source: josm/trunk/test/unit/org/openstreetmap/josm/corrector/ReverseWayNoTagCorrectorTest.java@ 9816

Last change on this file since 9816 was 9547, checked in by Don-vip, 8 years ago

checkstyle

File size: 1.3 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.corrector;
3
4import static org.junit.Assert.assertEquals;
5
6import org.junit.BeforeClass;
7import org.junit.Test;
8import org.openstreetmap.josm.JOSMFixture;
9import org.openstreetmap.josm.data.osm.Tag;
10
11/**
12 * Unit tests of {@link ReverseWayNoTagCorrector} class.
13 */
14public class ReverseWayNoTagCorrectorTest {
15
16 /**
17 * Setup test.
18 */
19 @BeforeClass
20 public static void setUp() {
21 JOSMFixture.createUnitTestFixture().init();
22 }
23
24 /**
25 * Tests the {@link ReverseWayNoTagCorrector#getDirectionalTags} function
26 */
27 @Test
28 public void testDirectionalTags() {
29 assertEquals(1, ReverseWayNoTagCorrector.getDirectionalTags(new Tag("waterway", "drain")).size());
30 assertEquals(1, ReverseWayNoTagCorrector.getDirectionalTags(new Tag("man_made", "embankment")).size());
31 assertEquals(1, ReverseWayNoTagCorrector.getDirectionalTags(new Tag("aerialway", "cable_car")).size());
32 assertEquals(0, ReverseWayNoTagCorrector.getDirectionalTags(new Tag("aerialway", "station")).size());
33 assertEquals(0, ReverseWayNoTagCorrector.getDirectionalTags(new Tag("incline", "up")).size());
34 assertEquals(0, ReverseWayNoTagCorrector.getDirectionalTags(new Tag("oneway", "yes")).size());
35 }
36}
Note: See TracBrowser for help on using the repository browser.