Ignore:
Timestamp:
2023-03-21T14:49:10+01:00 (2 years ago)
Author:
taylor.smock
Message:

See #16567: Convert most plugin tests to JUnit 5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/surveyor/test/unit/org/openstreetmap/josm/plugins/surveyor/SurveyorShowActionTest.java

    r35262 r36064  
    22package org.openstreetmap.josm.plugins.surveyor;
    33
    4 import static org.junit.Assert.assertNotNull;
    5 import static org.junit.Assert.assertTrue;
     4
     5import static org.junit.jupiter.api.Assertions.assertNotNull;
     6import static org.junit.jupiter.api.Assertions.assertTrue;
    67
    78import java.util.List;
    89
    9 import org.junit.Rule;
    10 import org.junit.Test;
    11 import org.openstreetmap.josm.testutils.JOSMTestRules;
     10import org.junit.jupiter.api.Test;
     11import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
    1212import org.openstreetmap.josm.tools.Logging;
    13 
    14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1513
    1614/**
    1715 * Unit tests of {@link #SurveyorShowAction}
    1816 */
    19 public class SurveyorShowActionTest {
    20 
    21     /**
    22      * Setup rule
    23      */
    24     @Rule
    25     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    26     public JOSMTestRules test = new JOSMTestRules().preferences();
    27 
     17@BasicPreferences
     18class SurveyorShowActionTest {
    2819    @Test
    29     public void testCreateComponent() {
     20    void testCreateComponent() {
    3021        Logging.clearLastErrorAndWarnings();
    3122        SurveyorComponent comp = SurveyorShowAction.createComponent();
    3223        assertNotNull(comp);
    3324        List<String> errors = Logging.getLastErrorAndWarnings();
    34         assertTrue(errors.toString(), errors.isEmpty());
     25        assertTrue(errors.isEmpty(), errors.toString());
    3526    }
    3627}
Note: See TracChangeset for help on using the changeset viewer.