Ignore:
Timestamp:
2023-10-04T00:03:40+02:00 (17 months ago)
Author:
taylor.smock
Message:

See #16567: Update to JUnit 5

This removes new JOSMTestRules() with no additional setup and most
JOSMFixture calls.

Removing the bare JOSMTestRules speeds up the test suite since there are two
fewer System.gc() calls per test.

Location:
trunk/test/unit/org/openstreetmap/josm/tools/template_engine
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateEntryTest.java

    r18690 r18853  
    66import java.util.Set;
    77
    8 import org.junit.jupiter.api.extension.RegisterExtension;
    98import org.junit.jupiter.api.Test;
    109import org.openstreetmap.josm.TestUtils;
    11 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1210import org.openstreetmap.josm.tools.Logging;
    1311
    14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1512import nl.jqno.equalsverifier.EqualsVerifier;
    1613import nl.jqno.equalsverifier.Warning;
     
    2017 */
    2118class TemplateEntryTest {
    22 
    23     /**
    24      * Setup rule.
    25      */
    26     @RegisterExtension
    27     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    28     public JOSMTestRules test = new JOSMTestRules();
    29 
    3019    /**
    3120     * Unit test of methods {@link TemplateEntry#equals} and {@link TemplateEntry#hashCode}, including all subclasses.
  • trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateParserTest.java

    r18690 r18853  
    88import java.util.List;
    99
    10 import org.junit.jupiter.api.BeforeAll;
    1110import org.junit.jupiter.api.Test;
    12 import org.openstreetmap.josm.JOSMFixture;
    1311import org.openstreetmap.josm.data.osm.Node;
    1412import org.openstreetmap.josm.data.osm.Relation;
     
    2321 */
    2422class TemplateParserTest {
    25 
    26     /**
    27      * Setup test.
    28      */
    29     @BeforeAll
    30     public static void setUp() {
    31         JOSMFixture.createUnitTestFixture().init();
    32     }
    33 
    3423    /**
    3524     * Test to parse an empty string.
Note: See TracChangeset for help on using the changeset viewer.