Ignore:
Timestamp:
2020-10-28T20:41:00+01:00 (3 years 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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceTest.java

    r16160 r17275  
    22package org.openstreetmap.josm.gui.preferences.plugin;
    33
    4 import static org.junit.Assert.assertEquals;
    5 import static org.junit.Assert.assertNotNull;
     4import static org.junit.jupiter.api.Assertions.assertEquals;
     5import static org.junit.jupiter.api.Assertions.assertNotNull;
    66
    77import java.io.File;
     
    1010import java.util.Collections;
    1111
    12 import org.junit.Rule;
    13 import org.junit.Test;
     12import org.junit.jupiter.api.Test;
     13import org.junit.jupiter.api.extension.RegisterExtension;
    1414import org.openstreetmap.josm.TestUtils;
    1515import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
     
    1818import org.openstreetmap.josm.plugins.PluginException;
    1919import org.openstreetmap.josm.plugins.PluginInformation;
     20import org.openstreetmap.josm.testutils.JOSMTestRules;
    2021import org.openstreetmap.josm.testutils.mockers.HelpAwareOptionPaneMocker;
    21 import org.openstreetmap.josm.testutils.JOSMTestRules;
    2222
    2323import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
     
    3030     * Setup test.
    3131     */
    32     @Rule
     32    @RegisterExtension
    3333    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    3434    public JOSMTestRules test = new JOSMTestRules().preferences().assertionsInEDT();
     
    3838     */
    3939    @Test
    40     public void testPluginPreference() {
     40    void testPluginPreference() {
    4141        assertNotNull(new PluginPreference.Factory().createPreferenceSetting());
    4242    }
     
    5757     */
    5858    @Test
    59     public void testBuildDownloadSummary() throws Exception {
     59    void testBuildDownloadSummary() throws Exception {
    6060        final PluginInformation dummy = getDummyPluginInformation();
    6161        assertEquals("", PluginPreference.buildDownloadSummary(
     
    8989     */
    9090    @Test
    91     public void testNotifyDownloadResults() {
     91    void testNotifyDownloadResults() {
    9292        final HelpAwareOptionPaneMocker mocker = new HelpAwareOptionPaneMocker();
    9393        mocker.getMockResultMap().put("<html></html>", "OK");  // (buildDownloadSummary() output was empty)
     
    103103     */
    104104    @Test
    105     public void testAddGui() {
     105    void testAddGui() {
    106106        PreferencesTestUtils.doTestPreferenceSettingAddGui(new PluginPreference.Factory(), null);
    107107    }
Note: See TracChangeset for help on using the changeset viewer.