Ignore:
Timestamp:
2020-10-28T20:41:00+01:00 (6 months ago)
Author:
Don-vip
Message:

see #16567 - upgrade almost all tests to JUnit 5, except those depending on WiremockRule

See https://github.com/tomakehurst/wiremock/issues/684

Location:
trunk/test/unit/org/openstreetmap/josm/spi
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/spi/lifecycle/LifecycleTest.java

    r14138 r17275  
    22package org.openstreetmap.josm.spi.lifecycle;
    33
    4 import static org.junit.Assert.assertFalse;
    5 import static org.junit.Assert.assertTrue;
     4import static org.junit.jupiter.api.Assertions.assertFalse;
     5import static org.junit.jupiter.api.Assertions.assertTrue;
    66
    7 import org.junit.Rule;
    8 import org.junit.Test;
     7import org.junit.jupiter.api.extension.RegisterExtension;
     8import org.junit.jupiter.api.Test;
    99import org.openstreetmap.josm.testutils.JOSMTestRules;
    1010
     
    1414 * Unit tests of {@link Lifecycle} class.
    1515 */
    16 public class LifecycleTest {
     16class LifecycleTest {
    1717
    1818    /**
    1919     * Setup test.
    2020     */
    21     @Rule
     21    @RegisterExtension
    2222    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    2323    public JOSMTestRules test = new JOSMTestRules().https().devAPI().main().projection();
     
    4444     */
    4545    @Test
    46     public void testSetInitStatusListener() {
     46    void testSetInitStatusListener() {
    4747        InitStatusListenerStub listener = new InitStatusListenerStub();
    4848        Lifecycle.setInitStatusListener(listener);
  • trunk/test/unit/org/openstreetmap/josm/spi/preferences/ListListSettingTest.java

    r13079 r17275  
    22package org.openstreetmap.josm.spi.preferences;
    33
    4 import org.junit.Rule;
    5 import org.junit.Test;
     4import org.junit.jupiter.api.extension.RegisterExtension;
     5import org.junit.jupiter.api.Test;
    66import org.openstreetmap.josm.TestUtils;
    77import org.openstreetmap.josm.testutils.JOSMTestRules;
     
    1313 * Test {@link ListListSetting}.
    1414 */
    15 public class ListListSettingTest {
     15class ListListSettingTest {
    1616    /**
    1717     * This is a preference test
    1818     */
    19     @Rule
     19    @RegisterExtension
    2020    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    2121    public JOSMTestRules test = new JOSMTestRules().preferences();
     
    2525     */
    2626    @Test
    27     public void testEqualsContract() {
     27    void testEqualsContract() {
    2828        TestUtils.assumeWorkingEqualsVerifier();
    2929        EqualsVerifier.forClass(ListListSetting.class).usingGetClass()
  • trunk/test/unit/org/openstreetmap/josm/spi/preferences/ListSettingTest.java

    r13079 r17275  
    22package org.openstreetmap.josm.spi.preferences;
    33
    4 import org.junit.Rule;
    5 import org.junit.Test;
     4import org.junit.jupiter.api.extension.RegisterExtension;
     5import org.junit.jupiter.api.Test;
    66import org.openstreetmap.josm.TestUtils;
    77import org.openstreetmap.josm.testutils.JOSMTestRules;
     
    1313 * Test {@link ListSetting}.
    1414 */
    15 public class ListSettingTest {
     15class ListSettingTest {
    1616    /**
    1717     * This is a preference test
    1818     */
    19     @Rule
     19    @RegisterExtension
    2020    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    2121    public JOSMTestRules test = new JOSMTestRules().preferences();
     
    2525     */
    2626    @Test
    27     public void testEqualsContract() {
     27    void testEqualsContract() {
    2828        TestUtils.assumeWorkingEqualsVerifier();
    2929        EqualsVerifier.forClass(ListSetting.class).usingGetClass()
  • trunk/test/unit/org/openstreetmap/josm/spi/preferences/MapListSettingTest.java

    r13079 r17275  
    22package org.openstreetmap.josm.spi.preferences;
    33
    4 import org.junit.Rule;
    5 import org.junit.Test;
     4import org.junit.jupiter.api.extension.RegisterExtension;
     5import org.junit.jupiter.api.Test;
    66import org.openstreetmap.josm.TestUtils;
    77import org.openstreetmap.josm.testutils.JOSMTestRules;
     
    1313 * Test {@link MapListSetting}.
    1414 */
    15 public class MapListSettingTest {
     15class MapListSettingTest {
    1616    /**
    1717     * This is a preference test
    1818     */
    19     @Rule
     19    @RegisterExtension
    2020    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    2121    public JOSMTestRules test = new JOSMTestRules().preferences();
     
    2525     */
    2626    @Test
    27     public void testEqualsContract() {
     27    void testEqualsContract() {
    2828        TestUtils.assumeWorkingEqualsVerifier();
    2929        EqualsVerifier.forClass(MapListSetting.class).usingGetClass()
  • trunk/test/unit/org/openstreetmap/josm/spi/preferences/StringSettingTest.java

    r13079 r17275  
    22package org.openstreetmap.josm.spi.preferences;
    33
    4 import org.junit.Rule;
    5 import org.junit.Test;
     4import org.junit.jupiter.api.extension.RegisterExtension;
     5import org.junit.jupiter.api.Test;
    66import org.openstreetmap.josm.TestUtils;
    77import org.openstreetmap.josm.testutils.JOSMTestRules;
     
    1313 * Test {@link StringSetting}.
    1414 */
    15 public class StringSettingTest {
     15class StringSettingTest {
    1616    /**
    1717     * This is a preference test
    1818     */
    19     @Rule
     19    @RegisterExtension
    2020    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    2121    public JOSMTestRules test = new JOSMTestRules().preferences();
     
    2525     */
    2626    @Test
    27     public void testEqualsContract() {
     27    void testEqualsContract() {
    2828        TestUtils.assumeWorkingEqualsVerifier();
    2929        EqualsVerifier.forClass(StringSetting.class).usingGetClass()
Note: See TracChangeset for help on using the changeset viewer.