Ignore:
Timestamp:
2021-07-16T09:16:33+02:00 (5 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/spi/preferences
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/spi/preferences/ListListSettingTest.java

    r17275 r18037  
    22package org.openstreetmap.josm.spi.preferences;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
    7 import org.openstreetmap.josm.testutils.JOSMTestRules;
     6import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
    87
    9 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    108import nl.jqno.equalsverifier.EqualsVerifier;
    119
     
    1311 * Test {@link ListListSetting}.
    1412 */
     13// This is a preference test
     14@BasicPreferences
    1515class ListListSettingTest {
    16     /**
    17      * This is a preference test
    18      */
    19     @RegisterExtension
    20     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    21     public JOSMTestRules test = new JOSMTestRules().preferences();
    22 
    2316    /**
    2417     * Unit test of methods {@link ListListSetting#equals} and {@link ListListSetting#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/spi/preferences/ListSettingTest.java

    r17275 r18037  
    22package org.openstreetmap.josm.spi.preferences;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
    7 import org.openstreetmap.josm.testutils.JOSMTestRules;
     6import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
    87
    9 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    108import nl.jqno.equalsverifier.EqualsVerifier;
    119
     
    1311 * Test {@link ListSetting}.
    1412 */
     13// This is a preference test
     14@BasicPreferences
    1515class ListSettingTest {
    16     /**
    17      * This is a preference test
    18      */
    19     @RegisterExtension
    20     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    21     public JOSMTestRules test = new JOSMTestRules().preferences();
    22 
    2316    /**
    2417     * Unit test of methods {@link ListSetting#equals} and {@link ListSetting#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/spi/preferences/MapListSettingTest.java

    r17275 r18037  
    22package org.openstreetmap.josm.spi.preferences;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
    7 import org.openstreetmap.josm.testutils.JOSMTestRules;
     6import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
    87
    9 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    108import nl.jqno.equalsverifier.EqualsVerifier;
    119
     
    1311 * Test {@link MapListSetting}.
    1412 */
     13// This is a preference test
     14@BasicPreferences
    1515class MapListSettingTest {
    16     /**
    17      * This is a preference test
    18      */
    19     @RegisterExtension
    20     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    21     public JOSMTestRules test = new JOSMTestRules().preferences();
    22 
    2316    /**
    2417     * Unit test of methods {@link MapListSetting#equals} and {@link MapListSetting#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/spi/preferences/StringSettingTest.java

    r17275 r18037  
    22package org.openstreetmap.josm.spi.preferences;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
    7 import org.openstreetmap.josm.testutils.JOSMTestRules;
     6import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
    87
    9 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    108import nl.jqno.equalsverifier.EqualsVerifier;
    119
     
    1311 * Test {@link StringSetting}.
    1412 */
     13// This is a preference test
     14@BasicPreferences
    1515class StringSettingTest {
    16     /**
    17      * This is a preference test
    18      */
    19     @RegisterExtension
    20     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    21     public JOSMTestRules test = new JOSMTestRules().preferences();
    22 
    2316    /**
    2417     * Unit test of methods {@link StringSetting#equals} and {@link StringSetting#hashCode}.
Note: See TracChangeset for help on using the changeset viewer.