Ignore:
Timestamp:
2023-11-02T13:14:51+01:00 (8 months ago)
Author:
taylor.smock
Message:

Fix #16567: Upgrade to JUnit 5

JOSMTestRules and JOSMTestFixture can reset the default JOSM profile, which can
be unexpected for new contributors. This updates all tests to use JUnit 5 and
the new JUnit 5 annotations.

This also renames MapCSSStyleSourceFilterTest to MapCSSStyleSourceFilterPerformanceTest
to match the naming convention for performance tests and fixes some lint issues.

This was tested by running all tests individually and together.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/markerlayer/WebMarkerTest.java

    r17275 r18893  
    77
    88import org.junit.jupiter.api.Test;
    9 import org.junit.jupiter.api.extension.RegisterExtension;
    109import org.openstreetmap.josm.TestUtils;
    1110import org.openstreetmap.josm.data.coor.LatLon;
    1211import org.openstreetmap.josm.data.gpx.GpxData;
    1312import org.openstreetmap.josm.data.gpx.WayPoint;
    14 import org.openstreetmap.josm.testutils.JOSMTestRules;
     13import org.openstreetmap.josm.testutils.annotations.FullPreferences;
     14import org.openstreetmap.josm.testutils.annotations.HTTPS;
     15import org.openstreetmap.josm.tools.PlatformHook;
    1516import org.openstreetmap.josm.tools.PlatformManager;
    16 import org.openstreetmap.josm.tools.PlatformHook;
    17 
    18 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1917
    2018import mockit.Expectations;
     
    2523 * Unit tests of {@link WebMarker} class.
    2624 */
     25@FullPreferences
     26@HTTPS
    2727class WebMarkerTest {
    28 
    29     /**
    30      * Setup tests
    31      */
    32     @RegisterExtension
    33     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    34     public JOSMTestRules test = new JOSMTestRules().preferences().https();
    35 
    3628    /**
    3729     * Unit test of {@link WebMarker#WebMarker}.
Note: See TracChangeset for help on using the changeset viewer.