Changeset 10081 in josm for trunk


Ignore:
Timestamp:
2016-03-30T00:35:59+02:00 (9 years ago)
Author:
Don-vip
Message:

see #12699 - rework unit test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/LongSegmentTest.java

    r10080 r10081  
    22package org.openstreetmap.josm.data.validation.tests;
    33
    4 import static org.junit.Assert.assertTrue;
     4import static org.junit.Assert.assertEquals;
    55
    66import org.junit.Before;
     
    2424    }
    2525
    26     private static boolean test(int expected, Way w) throws Exception {
     26    private static int test(Way w) throws Exception {
    2727        LongSegment test = new LongSegment();
    2828        test.initialize();
     
    3030        test.visit(w);
    3131        test.endTest();
    32         return test.getErrors().size() == expected;
     32        return test.getErrors().size();
    3333    }
    3434
     
    4545        // https://www.openstreetmap.org/node/468120683
    4646        w.addNode(new Node(new LatLon(54.5737391, 11.9246324)));
    47         assertTrue(test(1, w));
     47        assertEquals(1, test(w));
    4848
    4949        // Ferry route
    5050        w.put("route", "ferry");
    51         assertTrue(test(0, w));
     51        assertEquals(0, test(w));
    5252
    5353        // Short way
     
    5555        w.addNode(new Node(new LatLon(54.152, 12.097)));
    5656        w.addNode(new Node(new LatLon(54.153, 12.098)));
    57         assertTrue(test(0, w));
     57        assertEquals(0, test(w));
    5858    }
    5959}
Note: See TracChangeset for help on using the changeset viewer.