Ignore:
Timestamp:
2023-10-04T00:03:40+02:00 (14 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/data/osm/history
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryNodeTest.java

    r17838 r18853  
    99import java.util.Map;
    1010
    11 import org.junit.jupiter.api.extension.RegisterExtension;
    1211import org.junit.jupiter.api.Test;
    1312import org.openstreetmap.josm.data.coor.LatLon;
     
    1615import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
    1716import org.openstreetmap.josm.data.osm.User;
    18 import org.openstreetmap.josm.testutils.JOSMTestRules;
    19 
    20 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2117
    2218/**
     
    2420 */
    2521class HistoryNodeTest {
    26 
    27     /**
    28      * Setup test.
    29      */
    30     @RegisterExtension
    31     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    32     public JOSMTestRules test = new JOSMTestRules();
    33 
    3422    private static HistoryNode create(Instant d) {
    3523        return new HistoryNode(
  • trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryRelationTest.java

    r17838 r18853  
    99import java.util.Map;
    1010
    11 import org.junit.jupiter.api.extension.RegisterExtension;
    1211import org.junit.jupiter.api.Test;
    1312import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
     
    1514import org.openstreetmap.josm.data.osm.RelationMemberData;
    1615import org.openstreetmap.josm.data.osm.User;
    17 import org.openstreetmap.josm.testutils.JOSMTestRules;
    18 
    19 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2016
    2117/**
     
    2319 */
    2420class HistoryRelationTest {
    25 
    26     /**
    27      * Setup test.
    28      */
    29     @RegisterExtension
    30     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    31     public JOSMTestRules test = new JOSMTestRules();
    32 
    3321    private static HistoryRelation create(Instant d) {
    3422        return new HistoryRelation(
  • trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryWayTest.java

    r18690 r18853  
    1111import java.util.Map;
    1212
    13 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1413import org.junit.jupiter.api.Test;
    15 import org.junit.jupiter.api.extension.RegisterExtension;
    1614import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
    1715import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
    1816import org.openstreetmap.josm.data.osm.User;
    19 import org.openstreetmap.josm.testutils.JOSMTestRules;
    2017
    2118/**
     
    2320 */
    2421class HistoryWayTest {
    25 
    26     /**
    27      * Setup test.
    28      */
    29     @RegisterExtension
    30     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    31     public JOSMTestRules test = new JOSMTestRules();
    32 
    3322    private static HistoryWay create(Instant d) {
    3423        return new HistoryWay(
Note: See TracChangeset for help on using the changeset viewer.