Ignore:
Timestamp:
2021-07-16T09:16:33+02:00 (2 months ago)
Author:
Don-vip
Message:

fix #21064 - Add JUnit 5 extension for preferences (patch by taylor.smock)

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

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/bugreport/BugReportExceptionHandlerTest.java

    r17275 r18037  
    44import java.util.concurrent.CountDownLatch;
    55
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    9 
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    117
    128/**
     
    1410 */
    1511class BugReportExceptionHandlerTest {
    16     /**
    17      * No dependencies
    18      */
    19     @RegisterExtension
    20     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    21     public JOSMTestRules test = new JOSMTestRules();
    22 
    2312    /**
    2413     * Unit test for {@link BugReportExceptionHandler#handleException} method.
  • trunk/test/unit/org/openstreetmap/josm/tools/bugreport/BugReportTest.java

    r17275 r18037  
    1010import java.io.StringWriter;
    1111
    12 import org.junit.jupiter.api.extension.RegisterExtension;
    1312import org.junit.jupiter.api.Test;
    1413import org.openstreetmap.josm.actions.ShowStatusReportAction;
    15 import org.openstreetmap.josm.testutils.JOSMTestRules;
    16 
    17 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
     14import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
    1815
    1916/**
     
    2118 * @author Michael Zangl
    2219 */
     20// Preferences for the report text
     21@BasicPreferences
    2322class BugReportTest {
    24     /**
    25      * Preferences for the report text
    26      */
    27     @RegisterExtension
    28     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    29     public JOSMTestRules test = new JOSMTestRules().preferences();
    30 
    3123    /**
    3224     * Test {@link BugReport#getReportText}
Note: See TracChangeset for help on using the changeset viewer.