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/io/remotecontrol/RemoteControlTest.java

    r16436 r17275  
    22package org.openstreetmap.josm.io.remotecontrol;
    33
    4 import static org.junit.Assert.assertEquals;
     4import static org.junit.jupiter.api.Assertions.assertEquals;
    55
    66import java.io.BufferedReader;
     
    1515import java.util.stream.Collectors;
    1616
    17 import org.junit.After;
    18 import org.junit.Before;
    19 import org.junit.Rule;
    20 import org.junit.Test;
     17import org.junit.jupiter.api.AfterEach;
     18import org.junit.jupiter.api.BeforeEach;
     19import org.junit.jupiter.api.Test;
     20import org.junit.jupiter.api.extension.RegisterExtension;
    2121import org.openstreetmap.josm.TestUtils;
    2222import org.openstreetmap.josm.spi.preferences.Config;
     
    3232 * Unit tests for Remote Control
    3333 */
    34 public class RemoteControlTest {
     34class RemoteControlTest {
    3535
    3636    private String httpBase;
     
    4646     * Setup test.
    4747     */
    48     @Rule
     48    @RegisterExtension
    4949    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    5050    public JOSMTestRules test = new JOSMTestRules().preferences().https().assertionsInEDT();
     
    5454     * @throws GeneralSecurityException if a security error occurs
    5555     */
    56     @Before
     56    @BeforeEach
    5757    public void setUp() throws GeneralSecurityException {
    5858        if (PlatformManager.isPlatformWindows() && "True".equals(System.getenv("APPVEYOR"))) {
     
    6969     * Stops Remote control after testing requests.
    7070     */
    71     @After
     71    @AfterEach
    7272    public void tearDown() {
    7373        RemoteControl.stop();
     
    7979     */
    8080    @Test
    81     public void testHttpListOfCommands() throws Exception {
     81    void testHttpListOfCommands() throws Exception {
    8282        testListOfCommands(httpBase);
    8383    }
Note: See TracChangeset for help on using the changeset viewer.