Ignore:
Timestamp:
2020-10-28T20:41:00+01:00 (6 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/io/NetworkManagerTest.java

    r16426 r17275  
    22package org.openstreetmap.josm.io;
    33
    4 import static org.junit.Assert.assertEquals;
    5 import static org.junit.Assert.assertFalse;
    6 import static org.junit.Assert.assertTrue;
     4import static org.junit.jupiter.api.Assertions.assertEquals;
     5import static org.junit.jupiter.api.Assertions.assertFalse;
     6import static org.junit.jupiter.api.Assertions.assertTrue;
    77
    88import java.net.MalformedURLException;
     
    1010import java.util.Map;
    1111
    12 import org.junit.Rule;
    13 import org.junit.Test;
     12import org.junit.jupiter.api.extension.RegisterExtension;
     13import org.junit.jupiter.api.Test;
    1414import org.openstreetmap.josm.testutils.JOSMTestRules;
    1515
     
    1919 * Unit tests of {@link NetworkManager} class.
    2020 */
    21 public class NetworkManagerTest {
     21class NetworkManagerTest {
    2222
    2323    /**
    2424     * Setup test.
    2525     */
    26     @Rule
     26    @RegisterExtension
    2727    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    2828    public JOSMTestRules test = new JOSMTestRules().https().devAPI().main().projection();
     
    3535     */
    3636    @Test
    37     public void testNetworkErrors() throws MalformedURLException {
     37    void testNetworkErrors() throws MalformedURLException {
    3838        NetworkManager.clearNetworkErrors();
    3939        assertTrue(NetworkManager.getNetworkErrors().isEmpty());
     
    5252     */
    5353    @Test
    54     public void testOfflineResources() {
     54    void testOfflineResources() {
    5555        NetworkManager.setOnline(OnlineResource.ALL);
    5656        assertFalse(NetworkManager.isOffline("http://www.example.com/"));
Note: See TracChangeset for help on using the changeset viewer.