Ignore:
Timestamp:
2020-10-28T20:41:00+01:00 (7 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/preferences/validator
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorPreferenceTest.java

    r10378 r17275  
    22package org.openstreetmap.josm.gui.preferences.validator;
    33
    4 import static org.junit.Assert.assertNotNull;
     4import static org.junit.jupiter.api.Assertions.assertNotNull;
    55
    6 import org.junit.BeforeClass;
    7 import org.junit.Test;
     6import org.junit.jupiter.api.BeforeAll;
     7import org.junit.jupiter.api.Test;
    88import org.openstreetmap.josm.JOSMFixture;
    99import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
     
    1212 * Unit tests of {@link ValidatorPreference} class.
    1313 */
    14 public class ValidatorPreferenceTest {
     14class ValidatorPreferenceTest {
    1515
    1616    /**
    1717     * Setup test.
    1818     */
    19     @BeforeClass
     19    @BeforeAll
    2020    public static void setUpBeforeClass() {
    2121        JOSMFixture.createUnitTestFixture().init();
     
    2626     */
    2727    @Test
    28     public void testValidatorPreference() {
     28    void testValidatorPreference() {
    2929        assertNotNull(new ValidatorPreference.Factory().createPreferenceSetting());
    3030    }
     
    3434     */
    3535    @Test
    36     public void testAddGui() {
     36    void testAddGui() {
    3737        PreferencesTestUtils.doTestPreferenceSettingAddGui(new ValidatorPreference.Factory(), null);
    3838    }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreferenceTestIT.java

    r14719 r17275  
    22package org.openstreetmap.josm.gui.preferences.validator;
    33
    4 import static org.junit.Assert.assertFalse;
    5 import static org.junit.Assert.assertTrue;
     4import static org.junit.jupiter.api.Assertions.assertFalse;
     5import static org.junit.jupiter.api.Assertions.assertTrue;
    66
    77import java.io.IOException;
     
    99import java.util.Collection;
    1010
    11 import org.junit.Rule;
    12 import org.junit.Test;
     11import org.junit.jupiter.api.extension.RegisterExtension;
     12import org.junit.jupiter.api.Test;
    1313import org.openstreetmap.josm.data.preferences.sources.ExtendedSourceEntry;
    1414import org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker;
     
    2121 * Integration tests of {@link ValidatorTagCheckerRulesPreference} class.
    2222 */
    23 public class ValidatorTagCheckerRulesPreferenceTestIT {
     23class ValidatorTagCheckerRulesPreferenceTestIT {
    2424
    2525    /**
    2626     * Setup rule
    2727     */
    28     @Rule
     28    @RegisterExtension
    2929    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    3030    public JOSMTestRules test = new JOSMTestRules().https().timeout(20_000);
     
    3535     */
    3636    @Test
    37     public void testValidityOfAvailableRules() throws Exception {
     37    void testValidityOfAvailableRules() throws Exception {
    3838        Collection<ExtendedSourceEntry> sources = new ValidatorTagCheckerRulesPreference.TagCheckerRulesSourceEditor()
    3939                .loadAndGetAvailableSources();
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTestsPreferenceTest.java

    r10378 r17275  
    22package org.openstreetmap.josm.gui.preferences.validator;
    33
    4 import static org.junit.Assert.assertNotNull;
     4import static org.junit.jupiter.api.Assertions.assertNotNull;
    55
    6 import org.junit.BeforeClass;
    7 import org.junit.Test;
     6import org.junit.jupiter.api.BeforeAll;
     7import org.junit.jupiter.api.Test;
    88import org.openstreetmap.josm.JOSMFixture;
    99import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
     
    1212 * Unit tests of {@link ValidatorTestsPreference} class.
    1313 */
    14 public class ValidatorTestsPreferenceTest {
     14class ValidatorTestsPreferenceTest {
    1515
    1616    /**
    1717     * Setup test.
    1818     */
    19     @BeforeClass
     19    @BeforeAll
    2020    public static void setUpBeforeClass() {
    2121        JOSMFixture.createUnitTestFixture().init();
     
    2626     */
    2727    @Test
    28     public void testValidatorTestsPreference() {
     28    void testValidatorTestsPreference() {
    2929        assertNotNull(new ValidatorTestsPreference.Factory().createPreferenceSetting());
    3030    }
     
    3434     */
    3535    @Test
    36     public void testAddGui() {
     36    void testAddGui() {
    3737        PreferencesTestUtils.doTestPreferenceSettingAddGui(new ValidatorTestsPreference.Factory(), ValidatorPreference.class);
    3838    }
Note: See TracChangeset for help on using the changeset viewer.