Ignore:
Timestamp:
2015-10-11T17:28:19+02:00 (10 years ago)
Author:
Don-vip
Message:

improve/cleanup unit tests

Location:
trunk/test/unit/org/openstreetmap/josm/data/osm
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/osm/APIDataSetTest.java

    r8510 r8857  
    1414import org.openstreetmap.josm.data.APIDataSet;
    1515
     16/**
     17 * Unit tests for class {@link APIDataSet}.
     18 */
    1619public class APIDataSetTest {
    1720
     21    /**
     22     * Setup test.
     23     */
    1824    @BeforeClass
    1925    public static void init() {
  • trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java

    r8565 r8857  
    2424import org.openstreetmap.josm.data.projection.Projections;
    2525
     26/**
     27 * Unit tests for class {@link DataSetMerger}.
     28 */
    2629public class DataSetMergerTest {
    2730
     31    /**
     32     * Setup test.
     33     */
    2834    @BeforeClass
    2935    public static void init() {
  • trunk/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java

    r8510 r8857  
    2424import org.openstreetmap.josm.io.OsmReader;
    2525
     26/**
     27 * Unit tests for class {@link Filter}.
     28 */
    2629public class FilterTest {
    2730
     
    3538
    3639    @Test
    37     public void basic_test() throws ParseError {
     40    public void basic() throws ParseError {
    3841        DataSet ds = new DataSet();
    3942        Node n1 = new Node(new LatLon(0, 0));
     
    6366
    6467    @Test
    65     public void filter_test() throws ParseError, IllegalDataException, IOException {
     68    public void filter() throws ParseError, IllegalDataException, IOException {
    6669        for (int i : new int[] {1, 2, 3, 11, 12, 13, 14, 15}) {
    6770            DataSet ds;
  • trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveKeyHandlingTest.java

    r8510 r8857  
    1515 * Some unit test cases for basic tag management on {@link OsmPrimitive}. Uses
    1616 * {@link Node} for the tests, {@link OsmPrimitive} is abstract.
    17  *
    1817 */
    1918public class OsmPrimitiveKeyHandlingTest {
    2019
     20    /**
     21     * Setup test.
     22     */
    2123    @BeforeClass
    2224    public static void init() {
  • trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveTest.java

    r8510 r8857  
    1515public class OsmPrimitiveTest {
    1616
     17    /**
     18     * Setup test.
     19     */
    1720    @BeforeClass
    1821    public static void init() {
  • trunk/test/unit/org/openstreetmap/josm/data/osm/OsmUtilsTest.java

    r8624 r8857  
    22package org.openstreetmap.josm.data.osm;
    33
    4 import static org.hamcrest.CoreMatchers.is;
    5 import static org.junit.Assert.assertThat;
     4import static org.junit.Assert.assertEquals;
    65import static org.junit.Assert.assertTrue;
    76
     
    1211public class OsmUtilsTest {
    1312
     13    /**
     14     * Setup test.
     15     */
    1416    @BeforeClass
    1517    public static void setUp() {
     
    2123        final OsmPrimitive p = OsmUtils.createPrimitive("way name=Foo railway=rail");
    2224        assertTrue(p instanceof Way);
    23         assertThat(p.keySet().size(), is(2));
    24         assertThat(p.get("name"), is("Foo"));
    25         assertThat(p.get("railway"), is("rail"));
     25        assertEquals(2, p.keySet().size());
     26        assertEquals("Foo", p.get("name"));
     27        assertEquals("rail", p.get("railway"));
    2628    }
    2729
     
    2931    public void testArea() throws Exception {
    3032        final OsmPrimitive p = OsmUtils.createPrimitive("area name=Foo railway=rail");
    31         assertThat(p.getType(), is(OsmPrimitiveType.WAY));
     33        assertEquals(OsmPrimitiveType.WAY, p.getType());
    3234        assertTrue(p.getKeys().equals(OsmUtils.createPrimitive("way name=Foo railway=rail").getKeys()));
    33 
    3435    }
    3536
     
    3839        OsmUtils.createPrimitive("noway name=Foo");
    3940    }
    40 
    4141}
  • trunk/test/unit/org/openstreetmap/josm/data/osm/QuadBucketsTest.java

    r7937 r8857  
    2323public class QuadBucketsTest {
    2424
     25    /**
     26     * Setup test.
     27     */
    2528    @BeforeClass
    2629    public static void init() {
  • trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryNodeTest.java

    r8514 r8857  
    1212import org.openstreetmap.josm.data.osm.User;
    1313
     14/**
     15 * Unit tests for class {@link HistoryNode}.
     16 */
    1417public class HistoryNodeTest {
    1518
  • trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryWayTest.java

    r8513 r8857  
    1414import org.openstreetmap.josm.data.osm.User;
    1515
     16/**
     17 * Unit tests for class {@link HistoryWay}.
     18 */
    1619public class HistoryWayTest {
    1720
  • trunk/test/unit/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitorTest.java

    r8510 r8857  
    2121import org.openstreetmap.josm.data.osm.Way;
    2222
     23/**
     24 * Unit tests for class {@link MergeSourceBuildingVisitor}.
     25 */
    2326public class MergeSourceBuildingVisitorTest {
    2427
Note: See TracChangeset for help on using the changeset viewer.