Ignore:
Timestamp:
2020-10-28T20:41:00+01:00 (4 years ago)
Author:
Don-vip
Message:

see #16567 - upgrade almost all tests to JUnit 5, except those depending on WiremockRule

See https://github.com/tomakehurst/wiremock/issues/684

Location:
trunk/test/unit/org/openstreetmap/josm/actions/corrector
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/actions/corrector/ReverseWayNoTagCorrectorTest.java

    r17023 r17275  
    22package org.openstreetmap.josm.actions.corrector;
    33
    4 import static org.junit.Assert.assertEquals;
     4import static org.junit.jupiter.api.Assertions.assertEquals;
    55
    6 import org.junit.Rule;
    7 import org.junit.Test;
     6import org.junit.jupiter.api.extension.RegisterExtension;
     7import org.junit.jupiter.api.Test;
    88import org.openstreetmap.josm.data.osm.Tag;
    99import org.openstreetmap.josm.data.osm.Tagged;
     
    1616 * Unit tests of {@link ReverseWayNoTagCorrector} class.
    1717 */
    18 public class ReverseWayNoTagCorrectorTest {
     18class ReverseWayNoTagCorrectorTest {
    1919
    2020    /**
    2121     * Setup test.
    2222     */
    23     @Rule
     23    @RegisterExtension
    2424    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    2525    public JOSMTestRules test = new JOSMTestRules();
     
    2929     */
    3030    @Test
    31     public void testDirectionalTags() {
     31    void testDirectionalTags() {
    3232        assertEquals(1, ReverseWayNoTagCorrector.getDirectionalTags(new Tag("waterway", "drain")).size());
    3333        assertEquals(1, ReverseWayNoTagCorrector.getDirectionalTags(new Tag("man_made", "embankment")).size());
  • trunk/test/unit/org/openstreetmap/josm/actions/corrector/ReverseWayTagCorrectorTest.java

    r16771 r17275  
    88
    99import org.junit.Assert;
    10 import org.junit.Rule;
    11 import org.junit.Test;
     10import org.junit.jupiter.api.extension.RegisterExtension;
     11import org.junit.jupiter.api.Test;
    1212import org.openstreetmap.josm.data.correction.TagCorrection;
    1313import org.openstreetmap.josm.data.osm.Node;
     
    2424 * Unit tests of {@link ReverseWayTagCorrector} class.
    2525 */
    26 public class ReverseWayTagCorrectorTest {
     26class ReverseWayTagCorrectorTest {
    2727
    2828    /**
    2929     * Setup test.
    3030     */
    31     @Rule
     31    @RegisterExtension
    3232    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    3333    public JOSMTestRules test = new JOSMTestRules();
     
    3838     */
    3939    @Test
    40     public void testUtilityClass() throws ReflectiveOperationException {
     40    void testUtilityClass() throws ReflectiveOperationException {
    4141        UtilityClassTestUtil.assertUtilityClassWellDefined(ReverseWayTagCorrector.TagSwitcher.class);
    4242    }
     
    4646     */
    4747    @Test
    48     public void testTagSwitch() {
     48    void testTagSwitch() {
    4949        // oneway
    5050        assertSwitch(new Tag("oneway", "yes"), new Tag("oneway", "-1"));
     
    121121     */
    122122    @Test
    123     public void testSwitchingWayNodes() {
     123    void testSwitchingWayNodes() {
    124124        final Map<OsmPrimitive, List<TagCorrection>> tagCorrections = getTagCorrectionsForWay("direction=forward");
    125125        Assert.assertEquals(1, tagCorrections.size());
     
    132132     */
    133133    @Test
    134     public void testNotSwitchingWayNodes() {
     134    void testNotSwitchingWayNodes() {
    135135        Assert.assertEquals(0, getTagCorrectionsForWay("direction=SSW").size());
    136136        Assert.assertEquals(0, getTagCorrectionsForWay("direction=145").size());
Note: See TracChangeset for help on using the changeset viewer.