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

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/correction/RoleCorrectionTableTest.java

    r10962 r17275  
    22package org.openstreetmap.josm.gui.correction;
    33
    4 import static org.junit.Assert.assertEquals;
    5 import static org.junit.Assert.assertFalse;
    6 import static org.junit.Assert.assertNotNull;
    7 import static org.junit.Assert.assertNull;
    8 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.assertNotNull;
     7import static org.junit.jupiter.api.Assertions.assertNull;
     8import static org.junit.jupiter.api.Assertions.assertTrue;
    99
    1010import java.util.Arrays;
    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.data.correction.RoleCorrection;
    1515import org.openstreetmap.josm.data.osm.Node;
     
    2323 * Unit tests of {@link RoleCorrectionTable} class.
    2424 */
    25 public class RoleCorrectionTableTest {
     25class RoleCorrectionTableTest {
    2626
    2727    /**
    2828     * Setup tests
    2929     */
    30     @Rule
     30    @RegisterExtension
    3131    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    3232    public JOSMTestRules test = new JOSMTestRules();
     
    3636     */
    3737    @Test
    38     public void testRoleCorrectionTable() {
     38    void testRoleCorrectionTable() {
    3939        Relation r = new Relation();
    4040        RelationMember member = new RelationMember("foo", new Node());
  • trunk/test/unit/org/openstreetmap/josm/gui/correction/TagCorrectionTableTest.java

    r10962 r17275  
    22package org.openstreetmap.josm.gui.correction;
    33
    4 import static org.junit.Assert.assertEquals;
    5 import static org.junit.Assert.assertFalse;
    6 import static org.junit.Assert.assertNotNull;
    7 import static org.junit.Assert.assertNull;
    8 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.assertNotNull;
     7import static org.junit.jupiter.api.Assertions.assertNull;
     8import static org.junit.jupiter.api.Assertions.assertTrue;
    99
    1010import java.util.Arrays;
    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.data.correction.TagCorrection;
    1515import org.openstreetmap.josm.testutils.JOSMTestRules;
     
    2020 * Unit tests of {@link TagCorrectionTable} class.
    2121 */
    22 public class TagCorrectionTableTest {
     22class TagCorrectionTableTest {
    2323
    2424    /**
    2525     * Setup tests
    2626     */
    27     @Rule
     27    @RegisterExtension
    2828    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    2929    public JOSMTestRules test = new JOSMTestRules();
     
    3333     */
    3434    @Test
    35     public void testTagCorrectionTable() {
     35    void testTagCorrectionTable() {
    3636        TagCorrection tc1 = new TagCorrection("foo", "bar", "foo", "baz");
    3737        TagCorrection tc2 = new TagCorrection("bar", "foo", "baz", "foo");
Note: See TracChangeset for help on using the changeset viewer.