Ignore:
Timestamp:
2023-11-02T13:14:51+01:00 (2 years 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/spi/lifecycle/LifecycleTest.java

    r17275 r18893  
    55import static org.junit.jupiter.api.Assertions.assertTrue;
    66
    7 import org.junit.jupiter.api.extension.RegisterExtension;
    87import org.junit.jupiter.api.Test;
    9 import org.openstreetmap.josm.testutils.JOSMTestRules;
    10 
    11 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
     8import org.openstreetmap.josm.testutils.annotations.HTTPS;
     9import org.openstreetmap.josm.testutils.annotations.Main;
     10import org.openstreetmap.josm.testutils.annotations.OsmApi;
     11import org.openstreetmap.josm.testutils.annotations.Projection;
    1212
    1313/**
    1414 * Unit tests of {@link Lifecycle} class.
    1515 */
     16@HTTPS
     17@Main
     18@OsmApi(OsmApi.APIType.DEV)
     19@Projection
    1620class LifecycleTest {
    17 
    18     /**
    19      * Setup test.
    20      */
    21     @RegisterExtension
    22     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    23     public JOSMTestRules test = new JOSMTestRules().https().devAPI().main().projection();
    24 
    2521    private static class InitStatusListenerStub implements InitStatusListener {
    2622
Note: See TracChangeset for help on using the changeset viewer.