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/gui/preferences/imagery/AddWMTSLayerPanelTest.java

    r10977 r17275  
    22package org.openstreetmap.josm.gui.preferences.imagery;
    33
    4 import static org.junit.Assert.assertFalse;
     4import static org.junit.jupiter.api.Assertions.assertFalse;
     5import static org.junit.jupiter.api.Assertions.assertThrows;
    56
    6 import org.junit.Rule;
    7 import org.junit.Test;
     7import org.junit.jupiter.api.Test;
     8import org.junit.jupiter.api.extension.RegisterExtension;
    89import org.openstreetmap.josm.testutils.JOSMTestRules;
    910
     
    1314 * Unit tests of {@link AddWMTSLayerPanel} class.
    1415 */
    15 public class AddWMTSLayerPanelTest {
     16class AddWMTSLayerPanelTest {
    1617
    1718    /**
    1819     * Setup tests
    1920     */
    20     @Rule
     21    @RegisterExtension
    2122    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    2223    public JOSMTestRules test = new JOSMTestRules().preferences();
     
    2627     */
    2728    @Test
    28     public void testAddWMTSLayerPanel() {
     29    void testAddWMTSLayerPanel() {
    2930        AddWMTSLayerPanel panel = new AddWMTSLayerPanel();
    3031        assertFalse(panel.isImageryValid());
     
    3435     * Unit test of {@link AddWMTSLayerPanel#getImageryInfo}.
    3536     */
    36     @Test(expected = IllegalArgumentException.class)
    37     public void testGetImageryInfo() {
    38         new AddWMTSLayerPanel().getImageryInfo();
     37    @Test
     38    void testGetImageryInfo() {
     39        assertThrows(IllegalArgumentException.class, () -> new AddWMTSLayerPanel().getImageryInfo());
    3940    }
    4041}
Note: See TracChangeset for help on using the changeset viewer.