Ignore:
Timestamp:
2023-10-04T00:03:40+02:00 (3 years 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/notes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/notes/NoteCommentTest.java

    r17712 r18853  
    88import java.time.Instant;
    99
    10 import org.junit.jupiter.api.extension.RegisterExtension;
    1110import org.junit.jupiter.api.Test;
    12 import org.openstreetmap.josm.testutils.JOSMTestRules;
    13 
    14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1511
    1612/**
     
    1814 */
    1915class NoteCommentTest {
    20 
    21     /**
    22      * Setup test.
    23      */
    24     @RegisterExtension
    25     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    26     public JOSMTestRules test = new JOSMTestRules();
    27 
    2816    /**
    2917     * Unit test of {@link NoteComment} class.
  • trunk/test/unit/org/openstreetmap/josm/data/notes/NoteTest.java

    r17837 r18853  
    88import java.util.List;
    99
    10 import org.junit.jupiter.api.extension.RegisterExtension;
    1110import org.junit.jupiter.api.Test;
    1211import org.openstreetmap.josm.TestUtils;
    1312import org.openstreetmap.josm.data.coor.LatLon;
    1413import org.openstreetmap.josm.io.NoteReader;
    15 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1614
    17 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1815import nl.jqno.equalsverifier.EqualsVerifier;
    1916import nl.jqno.equalsverifier.Warning;
     
    2320 */
    2421class NoteTest {
    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    /**
    3423     * Unit test of {@link Note#toString} method.
Note: See TracChangeset for help on using the changeset viewer.