Ignore:
Timestamp:
2020-10-28T20:41:00+01:00 (12 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/gui/bugreport
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/bugreport/BugReportSettingsPanelTest.java

    r12790 r17275  
    22package org.openstreetmap.josm.gui.bugreport;
    33
    4 import static org.junit.Assert.assertNotNull;
     4import static org.junit.jupiter.api.Assertions.assertNotNull;
    55
    6 import org.junit.Rule;
    7 import org.junit.Test;
     6import org.junit.jupiter.api.extension.RegisterExtension;
     7import org.junit.jupiter.api.Test;
    88import org.openstreetmap.josm.testutils.JOSMTestRules;
    99import org.openstreetmap.josm.tools.bugreport.BugReport;
     
    1414 * Tests the {@link BugReportSettingsPanel} class.
    1515 */
    16 public class BugReportSettingsPanelTest {
     16class BugReportSettingsPanelTest {
    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();
     
    2727     */
    2828    @Test
    29     public void testBugReportSettingsPanel() {
     29    void testBugReportSettingsPanel() {
    3030        assertNotNull(new BugReportSettingsPanel(new BugReport(BugReport.intercept(new Exception()))));
    3131    }
  • trunk/test/unit/org/openstreetmap/josm/gui/bugreport/DebugTextDisplayTest.java

    r12790 r17275  
    22package org.openstreetmap.josm.gui.bugreport;
    33
    4 import static org.junit.Assert.assertEquals;
     4import static org.junit.jupiter.api.Assertions.assertEquals;
    55
    6 import org.junit.Rule;
    7 import org.junit.Test;
     6import org.junit.jupiter.api.extension.RegisterExtension;
     7import org.junit.jupiter.api.Test;
    88import org.openstreetmap.josm.gui.datatransfer.ClipboardUtils;
    99import org.openstreetmap.josm.testutils.JOSMTestRules;
     
    1414 * Unit test of {@link DebugTextDisplay} class.
    1515 */
    16 public class DebugTextDisplayTest {
     16class DebugTextDisplayTest {
    1717    /**
    1818     * Setup test
    1919     */
    20     @Rule
     20    @RegisterExtension
    2121    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    2222    public JOSMTestRules test = new JOSMTestRules().preferences();
     
    2626     */
    2727    @Test
    28     public void testGetCodeText() {
     28    void testGetCodeText() {
    2929        assertEquals("test", new DebugTextDisplay("test").getCodeText());
    3030    }
     
    3434     */
    3535    @Test
    36     public void testCopyToClipboard() {
     36    void testCopyToClipboard() {
    3737        new DebugTextDisplay("copy").copyToClipboard();
    3838        assertEquals(String.format("{{{%ncopy%n}}}"), ClipboardUtils.getClipboardStringContent());
Note: See TracChangeset for help on using the changeset viewer.