Changeset 18853 in josm for trunk/test


Ignore:
Timestamp:
2023-10-04T00:03:40+02:00 (14 months ago)
Author:
taylor.smock
Message:

See #16567: Update to JUnit 5

This removes new JOSMTestRules() with no additional setup and most
JOSMFixture calls.

Removing the bare JOSMTestRules speeds up the test suite since there are two
fewer System.gc() calls per test.

Location:
trunk/test
Files:
187 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/functional/org/openstreetmap/josm/gui/GettingStartedTest.java

    r17275 r18853  
    66import java.io.IOException;
    77
     8import org.junit.jupiter.api.Disabled;
    89import org.junit.jupiter.api.Test;
    9 import org.junit.jupiter.api.BeforeAll;
    10 import org.junit.jupiter.api.Disabled;
    11 import org.openstreetmap.josm.JOSMFixture;
    1210
    1311/**
     
    1513 */
    1614class GettingStartedTest {
    17 
    18     /**
    19      * Setup test.
    20      */
    21     @BeforeAll
    22     public static void init() {
    23         JOSMFixture.createFunctionalTestFixture().init();
    24     }
    25 
    2615    /**
    2716     * Tests that image links are replaced.
  • trunk/test/functional/org/openstreetmap/josm/gui/history/HistoryBrowserTestFT.java

    r17275 r18853  
    66import javax.swing.JFrame;
    77
    8 import org.junit.jupiter.api.BeforeAll;
    98import org.openstreetmap.josm.JOSMFixture;
    109import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
     
    1817
    1918class HistoryBrowserTestFT extends JFrame {
    20 
    21     @BeforeAll
    22     public static void init() {
    23         JOSMFixture.createFunctionalTestFixture().init();
    24     }
    2519
    2620    private HistoryBrowser browser;
     
    5751
    5852    public static void main(String[] args) {
    59         HistoryBrowserTestFT.init();
     53        JOSMFixture.createFunctionalTestFixture().init();
    6054        new HistoryBrowserTestFT().setVisible(true);
    6155    }
  • trunk/test/functional/org/openstreetmap/josm/tools/ImageProviderTest.java

    r17275 r18853  
    2525import javax.swing.ImageIcon;
    2626
    27 import org.junit.jupiter.api.BeforeAll;
    2827import org.junit.jupiter.api.BeforeEach;
    2928import org.junit.jupiter.api.Test;
    30 import org.junit.jupiter.api.extension.RegisterExtension;
    3129import org.junit.jupiter.params.ParameterizedTest;
    3230import org.junit.jupiter.params.provider.ValueSource;
    33 import org.openstreetmap.josm.JOSMFixture;
    3431import org.openstreetmap.josm.TestUtils;
    3532import org.openstreetmap.josm.data.coor.LatLon;
     
    3835import org.openstreetmap.josm.gui.tagging.presets.TaggingPresets;
    3936import org.openstreetmap.josm.gui.tagging.presets.items.Key;
    40 import org.openstreetmap.josm.testutils.JOSMTestRules;
    4137import org.xml.sax.SAXException;
    4238
    4339import com.kitfox.svg.SVGConst;
    44 
    4540import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    4641
     
    4944 */
    5045class ImageProviderTest {
    51 
    52     /**
    53      * Setup test.
    54      */
    55     @RegisterExtension
    56     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    57     public JOSMTestRules test = new JOSMTestRules();
    58 
    5946    private static final class LogHandler14319 extends Handler {
    6047        boolean failed;
     
    7461        public void close() throws SecurityException {
    7562        }
    76     }
    77 
    78     /**
    79      * Setup test.
    80      */
    81     @BeforeAll
    82     public static void setUp() {
    83         JOSMFixture.createUnitTestFixture().init();
    8463    }
    8564
  • trunk/test/functional/org/openstreetmap/josm/tools/ImageProviderTestIT.java

    r17275 r18853  
    55
    66import org.junit.jupiter.api.Test;
    7 import org.junit.jupiter.api.extension.RegisterExtension;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    9 
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    117
    128/**
     
    1410 */
    1511class ImageProviderTestIT {
    16 
    17     /**
    18      * Setup test.
    19      */
    20     @RegisterExtension
    21     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    22     public JOSMTestRules test = new JOSMTestRules();
    23 
    2412    /**
    2513     * Test fetching an image using {@code wiki://} protocol.
  • trunk/test/functional/org/openstreetmap/josm/tools/ImageProviderTestManual.java

    r17275 r18853  
    1111import javax.swing.JPanel;
    1212
     13import org.junit.jupiter.api.Disabled;
    1314import org.junit.jupiter.api.Test;
    14 import org.junit.jupiter.api.Disabled;
    15 import org.junit.jupiter.api.extension.RegisterExtension;
    16 import org.openstreetmap.josm.testutils.JOSMTestRules;
    17 
    18 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1915
    2016/**
     
    2218 */
    2319class ImageProviderTestManual {
    24 
    25     /**
    26      * Setup test.
    27      */
    28     @RegisterExtension
    29     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    30     public JOSMTestRules test = new JOSMTestRules();
    31 
    3220    /**
    3321     * Test getting a cursor
    3422     * @throws InterruptedException in case of thread interruption
    3523     */
    36     @Disabled("manual execution only, as the look of the cursor cannot be checked automatedly")
     24    @Disabled("manual execution only, as the look of the cursor cannot be checked automatically")
    3725    @Test
    3826    void testGetCursor() throws InterruptedException {
  • trunk/test/performance/org/openstreetmap/josm/io/OsmReaderPerformanceTest.java

    r18691 r18853  
    1212import java.util.concurrent.TimeUnit;
    1313
    14 import org.junit.jupiter.api.BeforeAll;
    1514import org.junit.jupiter.api.Test;
    1615import org.junit.jupiter.api.Timeout;
    17 import org.openstreetmap.josm.JOSMFixture;
    1816import org.openstreetmap.josm.PerformanceTestUtils;
    1917import org.openstreetmap.josm.PerformanceTestUtils.PerformanceTestTimer;
     
    3028class OsmReaderPerformanceTest {
    3129    private static final int TIMES = 4;
    32 
    33     /**
    34      * Prepare the test.
    35      */
    36     @BeforeAll
    37     public static void createJOSMFixture() {
    38         JOSMFixture.createPerformanceTestFixture().init(true);
    39     }
    4030
    4131    /**
  • trunk/test/performance/org/openstreetmap/josm/io/OsmWriterPerformanceTest.java

    r18690 r18853  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.io;
    3 
    4 import org.junit.jupiter.api.BeforeAll;
    5 import org.junit.jupiter.api.BeforeEach;
    6 import org.junit.jupiter.api.Test;
    7 import org.junit.jupiter.api.Timeout;
    8 import org.openstreetmap.josm.JOSMFixture;
    9 import org.openstreetmap.josm.PerformanceTestUtils;
    10 import org.openstreetmap.josm.PerformanceTestUtils.PerformanceTestTimer;
    11 import org.openstreetmap.josm.data.osm.DataSet;
    123
    134import java.io.PrintWriter;
    145import java.io.StringWriter;
    156import java.util.concurrent.TimeUnit;
     7
     8import org.junit.jupiter.api.BeforeEach;
     9import org.junit.jupiter.api.Test;
     10import org.junit.jupiter.api.Timeout;
     11import org.openstreetmap.josm.PerformanceTestUtils;
     12import org.openstreetmap.josm.PerformanceTestUtils.PerformanceTestTimer;
     13import org.openstreetmap.josm.data.osm.DataSet;
    1614
    1715/**
     
    2422    private static final int TIMES = 4;
    2523    private DataSet neubrandenburgDataSet;
    26 
    27     /**
    28      * Prepare the test.
    29      */
    30     @BeforeAll
    31     public static void createJOSMFixture() {
    32         JOSMFixture.createPerformanceTestFixture().init(true);
    33     }
    3424
    3525    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/CombineWayActionTest.java

    r17275 r18853  
    1515import java.util.Set;
    1616
    17 import org.junit.jupiter.api.extension.RegisterExtension;
    1817import org.junit.jupiter.api.Test;
    1918import org.openstreetmap.josm.TestUtils;
     
    2423import org.openstreetmap.josm.io.IllegalDataException;
    2524import org.openstreetmap.josm.io.OsmReader;
    26 import org.openstreetmap.josm.testutils.JOSMTestRules;
    2725
    28 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2926import nl.jqno.equalsverifier.EqualsVerifier;
    3027
     
    3330 */
    3431class CombineWayActionTest {
    35 
    36     /**
    37      * Setup test.
    38      */
    39     @RegisterExtension
    40     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    41     public JOSMTestRules test = new JOSMTestRules();
    42 
    4332    /**
    4433     * Non-regression test for bug #11957.
  • trunk/test/unit/org/openstreetmap/josm/actions/corrector/ReverseWayNoTagCorrectorTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertEquals;
    55
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    76import org.junit.jupiter.api.Test;
    87import org.openstreetmap.josm.data.osm.Tag;
    98import org.openstreetmap.josm.data.osm.Tagged;
    109import org.openstreetmap.josm.data.osm.Way;
    11 import org.openstreetmap.josm.testutils.JOSMTestRules;
    12 
    13 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1410
    1511/**
     
    1713 */
    1814class ReverseWayNoTagCorrectorTest {
    19 
    20     /**
    21      * Setup test.
    22      */
    23     @RegisterExtension
    24     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    25     public JOSMTestRules test = new JOSMTestRules();
    26 
    2715    /**
    2816     * Tests the {@link ReverseWayNoTagCorrector#getDirectionalTags} function
  • trunk/test/unit/org/openstreetmap/josm/actions/corrector/ReverseWayTagCorrectorTest.java

    r18690 r18853  
    1212
    1313import org.junit.jupiter.api.Test;
    14 import org.junit.jupiter.api.extension.RegisterExtension;
    1514import org.openstreetmap.josm.data.correction.TagCorrection;
    1615import org.openstreetmap.josm.data.osm.Node;
     
    1918import org.openstreetmap.josm.data.osm.Tag;
    2019import org.openstreetmap.josm.data.osm.Way;
    21 import org.openstreetmap.josm.testutils.JOSMTestRules;
    2220
    23 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2421import net.trajano.commons.testing.UtilityClassTestUtil;
    2522
     
    2825 */
    2926class ReverseWayTagCorrectorTest {
    30 
    31     /**
    32      * Setup test.
    33      */
    34     @RegisterExtension
    35     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    36     public JOSMTestRules test = new JOSMTestRules();
    37 
    3827    /**
    3928     * Tests that {@code ReverseWayTagCorrector.TagSwitcher} satisfies utility class criteria.
  • trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/ChangesetContentDownloadTaskTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.actions.downloadtasks;
    33
    4 import static org.junit.jupiter.api.Assertions.assertNotNull;
     4import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
    55import static org.junit.jupiter.api.Assertions.assertThrows;
    66
    77import java.awt.Component;
    88import java.util.Arrays;
     9import java.util.List;
    910
    1011import org.junit.jupiter.api.Test;
    11 import org.junit.jupiter.api.extension.RegisterExtension;
    12 import org.openstreetmap.josm.testutils.JOSMTestRules;
    13 
    14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1512
    1613/**
     
    1815 */
    1916class ChangesetContentDownloadTaskTest {
    20 
    21     /**
    22      * Setup test.
    23      */
    24     @RegisterExtension
    25     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    26     public JOSMTestRules test = new JOSMTestRules();
    27 
    2817    /**
    2918     * Unit test of {@code ChangesetContentDownloadTask#ChangesetContentDownloadTask}.
     
    3423            // empty component
    3524        };
    36         assertNotNull(new ChangesetContentDownloadTask(parent, 1));
    37         assertNotNull(new ChangesetContentDownloadTask(parent, Arrays.asList(1, 2)));
    38         assertNotNull(new ChangesetContentDownloadTask(parent, null));
     25        assertDoesNotThrow(() -> new ChangesetContentDownloadTask(parent, 1));
     26        assertDoesNotThrow(() -> new ChangesetContentDownloadTask(parent, Arrays.asList(1, 2)));
     27        assertDoesNotThrow(() -> new ChangesetContentDownloadTask(parent, null));
    3928    }
    4029
     
    6049    @Test
    6150    void testChangesetContentDownloadTaskNullParent2() {
    62         assertThrows(IllegalArgumentException.class, () -> new ChangesetContentDownloadTask(Arrays.asList(1, 2)));
     51        final List<Integer> toDownload = Arrays.asList(1, 2);
     52        assertThrows(IllegalArgumentException.class, () -> new ChangesetContentDownloadTask(toDownload));
    6353    }
    6454}
  • trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/ChangesetHeaderDownloadTaskTest.java

    r17275 r18853  
    66
    77import java.awt.Component;
     8import java.util.Collection;
    89import java.util.Collections;
    910
    1011import org.junit.jupiter.api.Test;
    11 import org.junit.jupiter.api.extension.RegisterExtension;
    1212import org.openstreetmap.josm.data.osm.Changeset;
    13 import org.openstreetmap.josm.testutils.JOSMTestRules;
    14 
    15 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1613
    1714/**
     
    1916 */
    2017class ChangesetHeaderDownloadTaskTest {
    21 
    22     /**
    23      * Setup test.
    24      */
    25     @RegisterExtension
    26     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    27     public JOSMTestRules test = new JOSMTestRules();
    28 
    2918    /**
    3019     * Unit test of {@code ChangesetHeaderDownloadTask#buildTaskForChangesets}.
     
    3625        };
    3726        assertNotNull(ChangesetHeaderDownloadTask.buildTaskForChangesets(parent, Collections.singleton(new Changeset(1))));
    38         assertNotNull(ChangesetHeaderDownloadTask.buildTaskForChangesets(parent, Collections.<Changeset>singleton(null)));
     27        assertNotNull(ChangesetHeaderDownloadTask.buildTaskForChangesets(parent, Collections.singleton(null)));
    3928        assertNotNull(ChangesetHeaderDownloadTask.buildTaskForChangesets(parent, null));
    4029    }
     
    4534    @Test
    4635    void testBuildTaskForChangesetsNullParent() {
     36        final Collection<Changeset> changesets = Collections.singleton(new Changeset(1));
    4737        assertThrows(NullPointerException.class,
    48                 () -> ChangesetHeaderDownloadTask.buildTaskForChangesets(Collections.singleton(new Changeset(1))));
     38                () -> ChangesetHeaderDownloadTask.buildTaskForChangesets(changesets));
    4939    }
    5040}
  • trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/ChangesetQueryTaskTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.actions.downloadtasks;
    33
    4 import static org.junit.jupiter.api.Assertions.assertNotNull;
     4import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
    55import static org.junit.jupiter.api.Assertions.assertThrows;
    66
     
    88
    99import org.junit.jupiter.api.Test;
    10 import org.junit.jupiter.api.extension.RegisterExtension;
    1110import org.openstreetmap.josm.io.ChangesetQuery;
    12 import org.openstreetmap.josm.testutils.JOSMTestRules;
    13 
    14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1511
    1612/**
     
    1814 */
    1915class ChangesetQueryTaskTest {
    20 
    21     /**
    22      * Setup test.
    23      */
    24     @RegisterExtension
    25     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    26     public JOSMTestRules test = new JOSMTestRules();
    27 
    2816    /**
    2917     * Unit test of {@code ChangesetQueryTask#ChangesetQueryTask}.
     
    3422            // empty component
    3523        };
    36         assertNotNull(new ChangesetQueryTask(parent, new ChangesetQuery()));
     24        assertDoesNotThrow(() -> new ChangesetQueryTask(parent, new ChangesetQuery()));
    3725    }
    3826
     
    4230    @Test
    4331    void testChangesetQueryTaskNullParent() {
    44         assertThrows(IllegalArgumentException.class, () -> new ChangesetQueryTask(new ChangesetQuery()));
     32        final ChangesetQuery query = new ChangesetQuery();
     33        assertThrows(IllegalArgumentException.class, () -> new ChangesetQueryTask(query));
    4534    }
    4635}
  • trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/DownloadReferrersTaskTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.actions.downloadtasks;
    33
     4import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
    45import static org.junit.jupiter.api.Assertions.assertEquals;
    5 import static org.junit.jupiter.api.Assertions.assertNotNull;
    6 import static org.junit.jupiter.api.Assertions.fail;
     6import static org.junit.jupiter.api.Assertions.assertThrows;
    77
    88import org.junit.jupiter.api.Test;
    9 import org.junit.jupiter.api.extension.RegisterExtension;
    109import org.openstreetmap.josm.data.coor.LatLon;
    1110import org.openstreetmap.josm.data.osm.DataSet;
     
    1312import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
    1413import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    15 import org.openstreetmap.josm.testutils.JOSMTestRules;
    16 
    17 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1814
    1915/**
     
    2117 */
    2218class DownloadReferrersTaskTest {
    23 
    24     /**
    25      * Setup test.
    26      */
    27     @RegisterExtension
    28     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    29     public JOSMTestRules test = new JOSMTestRules();
    30 
    3119    /**
    3220     * Unit test of {@code DownloadReferrersTask#DownloadReferrersTask}.
     
    4230        ds.addPrimitive(n2);
    4331        OsmDataLayer layer = new OsmDataLayer(new DataSet(), "", null);
    44         assertNotNull(new DownloadReferrersTask(layer, null));
    45         assertNotNull(new DownloadReferrersTask(layer, ds.allPrimitives()));
    46         try {
    47             new DownloadReferrersTask(layer, n1.getPrimitiveId(), null);
    48             fail();
    49         } catch (IllegalArgumentException e) {
    50             assertEquals("Cannot download referrers for new primitives (ID -1)", e.getMessage());
    51         }
    52         assertNotNull(new DownloadReferrersTask(layer, n2.getPrimitiveId(), null));
     32        assertDoesNotThrow(() -> new DownloadReferrersTask(layer, null));
     33        assertDoesNotThrow(() -> new DownloadReferrersTask(layer, ds.allPrimitives()));
     34        IllegalArgumentException iae = assertThrows(IllegalArgumentException.class,
     35                () -> new DownloadReferrersTask(layer, n1, null));
     36        assertEquals("Cannot download referrers for new primitives (ID -1)", iae.getMessage());
     37        assertDoesNotThrow(() -> new DownloadReferrersTask(layer, n2.getPrimitiveId(), null));
    5338    }
    5439}
  • trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/DownloadTaskListTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.actions.downloadtasks;
    33
     4import static org.junit.jupiter.api.Assertions.assertNull;
    45import static org.junit.jupiter.api.Assertions.assertTrue;
    5 import static org.junit.jupiter.api.Assertions.assertNull;
    66
    77import java.awt.geom.Area;
     
    99
    1010import org.junit.jupiter.api.Test;
    11 import org.junit.jupiter.api.extension.RegisterExtension;
    1211import org.openstreetmap.josm.data.Bounds;
    1312import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
    14 import org.openstreetmap.josm.testutils.JOSMTestRules;
    15 
    16 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1713
    1814/**
     
    2016 */
    2117class DownloadTaskListTest {
    22 
    23     /**
    24      * Setup test.
    25      */
    26     @RegisterExtension
    27     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    28     public JOSMTestRules test = new JOSMTestRules();
    29 
    3018    /**
    3119     * Unit test of {@code DownloadTaskList#DownloadTaskList}.
     
    5038        assertTrue(list.getDownloadedPrimitives().isEmpty());
    5139        assertNull(list.download(false,
    52                 Collections.<Area>singletonList(new Area(new Bounds(0, 0, true).asRect())), false, false, NullProgressMonitor.INSTANCE).get());
     40                Collections.singletonList(new Area(new Bounds(0, 0, true).asRect())), false, false, NullProgressMonitor.INSTANCE).get());
    5341        assertTrue(list.getDownloadedPrimitives().isEmpty());
    5442    }
  • trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandlerTest.java

    r17275 r18853  
    1414
    1515import org.junit.jupiter.api.Test;
    16 import org.junit.jupiter.api.extension.RegisterExtension;
    1716import org.openstreetmap.josm.data.Bounds;
    1817import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    19 import org.openstreetmap.josm.testutils.JOSMTestRules;
    2018import org.openstreetmap.josm.tools.Logging;
    21 
    22 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2319
    2420/**
     
    2622 */
    2723class PostDownloadHandlerTest {
    28 
    29     /**
    30      * Setup test.
    31      */
    32     @RegisterExtension
    33     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    34     public JOSMTestRules test = new JOSMTestRules();
    35 
    3624    private static DownloadTask newTask(final List<Object> errorObjects) {
    3725        return new DownloadTask() {
  • trunk/test/unit/org/openstreetmap/josm/command/TransformNodesCommandTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.command;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
     
    98import org.openstreetmap.josm.data.osm.User;
    109import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    11 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1210
    13 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1411import nl.jqno.equalsverifier.EqualsVerifier;
    1512import nl.jqno.equalsverifier.Warning;
     
    1916 */
    2017class TransformNodesCommandTest {
    21 
    22     /**
    23      * Setup test.
    24      */
    25     @RegisterExtension
    26     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    27     public JOSMTestRules test = new JOSMTestRules();
    28 
    2918    /**
    3019     * Unit test of methods {@link TransformNodesCommand#equals} and {@link TransformNodesCommand#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictAddCommandTest.java

    r17275 r18853  
    88import org.junit.jupiter.api.BeforeEach;
    99import org.junit.jupiter.api.Test;
    10 import org.junit.jupiter.api.extension.RegisterExtension;
    1110import org.openstreetmap.josm.TestUtils;
    1211import org.openstreetmap.josm.command.CommandTest.CommandTestData;
     
    1716import org.openstreetmap.josm.data.osm.Way;
    1817import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    19 import org.openstreetmap.josm.testutils.JOSMTestRules;
    2018
    21 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2219import nl.jqno.equalsverifier.EqualsVerifier;
    2320import nl.jqno.equalsverifier.Warning;
     
    2724 */
    2825class ConflictAddCommandTest {
    29 
    30     /**
    31      * Setup test.
    32      */
    33     @RegisterExtension
    34     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    35     public JOSMTestRules test = new JOSMTestRules();
    3626    private CommandTestData testData;
    3727
  • trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictResolveCommandTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.command.conflict;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
     
    109import org.openstreetmap.josm.data.osm.User;
    1110import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    12 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1311
    14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1512import nl.jqno.equalsverifier.EqualsVerifier;
    1613import nl.jqno.equalsverifier.Warning;
     
    2017 */
    2118class ConflictResolveCommandTest {
    22 
    23     /**
    24      * Setup test.
    25      */
    26     @RegisterExtension
    27     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    28     public JOSMTestRules test = new JOSMTestRules();
    29 
    3019    /**
    3120     * Unit test of methods {@link ConflictResolveCommand#equals} and {@link ConflictResolveCommand#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommandTest.java

    r17275 r18853  
    88import org.junit.jupiter.api.BeforeEach;
    99import org.junit.jupiter.api.Test;
    10 import org.junit.jupiter.api.extension.RegisterExtension;
    1110import org.openstreetmap.josm.TestUtils;
    1211import org.openstreetmap.josm.command.CommandTest.CommandTestData;
     
    1918import org.openstreetmap.josm.gui.conflict.pair.MergeDecisionType;
    2019import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    21 import org.openstreetmap.josm.testutils.JOSMTestRules;
    2220
    23 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2421import nl.jqno.equalsverifier.EqualsVerifier;
    2522import nl.jqno.equalsverifier.Warning;
     
    3128
    3229    private CommandTestData testData;
    33 
    34     /**
    35      * Setup test.
    36      */
    37     @RegisterExtension
    38     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    39     public JOSMTestRules test = new JOSMTestRules();
    4030
    4131    /**
  • trunk/test/unit/org/openstreetmap/josm/command/conflict/DeletedStateConflictResolveCommandTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.command.conflict;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
     
    1110import org.openstreetmap.josm.data.osm.Way;
    1211import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    13 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1412
    15 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1613import nl.jqno.equalsverifier.EqualsVerifier;
    1714import nl.jqno.equalsverifier.Warning;
     
    2118 */
    2219class DeletedStateConflictResolveCommandTest {
    23 
    24     /**
    25      * Setup test.
    26      */
    27     @RegisterExtension
    28     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    29     public JOSMTestRules test = new JOSMTestRules();
    30 
    3120    /**
    3221     * Unit test of methods {@link DeletedStateConflictResolveCommand#equals} and {@link DeletedStateConflictResolveCommand#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/command/conflict/ModifiedConflictResolveCommandTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.command.conflict;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
     
    1110import org.openstreetmap.josm.data.osm.Way;
    1211import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    13 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1412
    15 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1613import nl.jqno.equalsverifier.EqualsVerifier;
    1714import nl.jqno.equalsverifier.Warning;
     
    2118 */
    2219class ModifiedConflictResolveCommandTest {
    23 
    24     /**
    25      * Setup test.
    26      */
    27     @RegisterExtension
    28     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    29     public JOSMTestRules test = new JOSMTestRules();
    30 
    3120    /**
    3221     * Unit test of methods {@link ModifiedConflictResolveCommand#equals} and {@link ModifiedConflictResolveCommand#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/command/conflict/RelationMemberConflictResolverCommandTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.command.conflict;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
     
    1110import org.openstreetmap.josm.data.osm.User;
    1211import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    13 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1412
    15 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1613import nl.jqno.equalsverifier.EqualsVerifier;
    1714import nl.jqno.equalsverifier.Warning;
     
    2118 */
    2219class RelationMemberConflictResolverCommandTest {
    23 
    24     /**
    25      * Setup test.
    26      */
    27     @RegisterExtension
    28     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    29     public JOSMTestRules test = new JOSMTestRules();
    30 
    3120    /**
    3221     * Unit test of methods {@link RelationMemberConflictResolverCommand#equals} and {@link RelationMemberConflictResolverCommand#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/command/conflict/TagConflictResolveCommandTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.command.conflict;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
     
    1110import org.openstreetmap.josm.data.osm.Way;
    1211import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    13 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1412
    15 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1613import nl.jqno.equalsverifier.EqualsVerifier;
    1714import nl.jqno.equalsverifier.Warning;
     
    2118 */
    2219class TagConflictResolveCommandTest {
    23 
    24     /**
    25      * Setup test.
    26      */
    27     @RegisterExtension
    28     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    29     public JOSMTestRules test = new JOSMTestRules();
    30 
    3120    /**
    3221     * Unit test of methods {@link TagConflictResolveCommand#equals} and {@link TagConflictResolveCommand#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/command/conflict/VersionConflictResolveCommandTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.command.conflict;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
     
    1110import org.openstreetmap.josm.data.osm.Way;
    1211import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    13 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1412
    15 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1613import nl.jqno.equalsverifier.EqualsVerifier;
    1714import nl.jqno.equalsverifier.Warning;
     
    2118 */
    2219class VersionConflictResolveCommandTest {
    23 
    24     /**
    25      * Setup test.
    26      */
    27     @RegisterExtension
    28     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    29     public JOSMTestRules test = new JOSMTestRules();
    30 
    3120    /**
    3221     * Unit test of methods {@link VersionConflictResolveCommand#equals} and {@link VersionConflictResolveCommand#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/command/conflict/WayNodesConflictResolverCommandTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.command.conflict;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
     
    1110import org.openstreetmap.josm.data.osm.Way;
    1211import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    13 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1412
    15 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1613import nl.jqno.equalsverifier.EqualsVerifier;
    1714import nl.jqno.equalsverifier.Warning;
     
    2118 */
    2219class WayNodesConflictResolverCommandTest {
    23 
    24     /**
    25      * Setup test.
    26      */
    27     @RegisterExtension
    28     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    29     public JOSMTestRules test = new JOSMTestRules();
    30 
    3120    /**
    3221     * Unit test of methods {@link WayNodesConflictResolverCommand#equals} and {@link WayNodesConflictResolverCommand#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/data/APIDataSetTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertEquals;
    55import static org.junit.jupiter.api.Assertions.assertFalse;
     6import static org.junit.jupiter.api.Assertions.assertThrows;
    67import static org.junit.jupiter.api.Assertions.assertTrue;
    7 import static org.junit.jupiter.api.Assertions.fail;
    88
    99import java.util.List;
    1010
    11 import org.junit.jupiter.api.extension.RegisterExtension;
    1211import org.junit.jupiter.api.Test;
    1312import org.openstreetmap.josm.data.conflict.ConflictCollection;
     
    1918import org.openstreetmap.josm.data.osm.RelationMember;
    2019import org.openstreetmap.josm.data.osm.Way;
    21 import org.openstreetmap.josm.testutils.JOSMTestRules;
    22 
    23 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2420
    2521/**
     
    2723 */
    2824class APIDataSetTest {
    29 
    30     /**
    31      * Setup test.
    32      */
    33     @RegisterExtension
    34     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    35     public JOSMTestRules test = new JOSMTestRules();
    36 
    3725    @Test
    3826    void testOneNewRelationOnly() throws CyclicUploadDependencyException {
     
    250238        APIDataSet apiDataSet = new APIDataSet();
    251239        apiDataSet.init(ds);
    252         try {
    253             apiDataSet.adjustRelationUploadOrder();
    254             fail("expected cyclic upload dependency exception not thrown");
    255         } catch (CyclicUploadDependencyException e) {
    256             System.out.println(e);
    257         }
     240        assertThrows(CyclicUploadDependencyException.class, apiDataSet::adjustRelationUploadOrder);
    258241    }
    259242}
  • trunk/test/unit/org/openstreetmap/josm/data/VersionTest.java

    r17275 r18853  
    88import java.nio.charset.StandardCharsets;
    99
    10 import org.junit.jupiter.api.BeforeAll;
    1110import org.junit.jupiter.api.Test;
    12 import org.openstreetmap.josm.JOSMFixture;
    1311
    1412/**
     
    1614 */
    1715class VersionTest {
    18 
    19     /**
    20      * Setup test.
    21      */
    22     @BeforeAll
    23     public static void setUpBeforeClass() {
    24         JOSMFixture.createUnitTestFixture().init();
    25     }
    26 
    2716    /**
    2817     * Unit test of {@link Version#getAgentString}
  • trunk/test/unit/org/openstreetmap/josm/data/coor/CachedLatLonTest.java

    r17275 r18853  
    44import java.text.DecimalFormat;
    55
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    76import org.junit.jupiter.api.Test;
    87import org.openstreetmap.josm.TestUtils;
    9 import org.openstreetmap.josm.testutils.JOSMTestRules;
    108
    11 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    129import nl.jqno.equalsverifier.EqualsVerifier;
    1310import nl.jqno.equalsverifier.Warning;
     
    1714 */
    1815class CachedLatLonTest {
    19 
    20     /**
    21      * Setup test.
    22      */
    23     @RegisterExtension
    24     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    25     public JOSMTestRules test = new JOSMTestRules();
    26 
    2716    /**
    2817     * Unit test of methods {@link CachedLatLon#equals} and {@link CachedLatLon#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/data/correction/TagCorrectionTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.data.correction;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
    7 import org.openstreetmap.josm.testutils.JOSMTestRules;
    86
    9 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    107import nl.jqno.equalsverifier.EqualsVerifier;
    118
     
    1411 */
    1512class TagCorrectionTest {
    16 
    17     /**
    18      * Setup test.
    19      */
    20     @RegisterExtension
    21     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    22     public JOSMTestRules test = new JOSMTestRules();
    23 
    2413    /**
    2514     * Unit test of methods {@link TagCorrection#equals} and {@link TagCorrection#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxExtensionCollectionTest.java

    r17984 r18853  
    99import org.junit.jupiter.api.BeforeEach;
    1010import org.junit.jupiter.api.Test;
    11 import org.junit.jupiter.api.extension.RegisterExtension;
    12 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1311import org.openstreetmap.josm.tools.Logging;
    1412import org.xml.sax.helpers.AttributesImpl;
    15 
    16 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1713
    1814/**
     
    2016 */
    2117class GpxExtensionCollectionTest {
    22 
    23     /**
    24      * Setup test.
    25      */
    26     @RegisterExtension
    27     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    28     public JOSMTestRules test = new JOSMTestRules();
    29 
    3018    @BeforeEach
    3119    void before() {
  • trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxExtensionTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.data.gpx;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
     
    87import org.openstreetmap.josm.io.GpxReaderTest;
    98import org.openstreetmap.josm.io.GpxWriterTest;
    10 import org.openstreetmap.josm.testutils.JOSMTestRules;
    119
    12 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1310import nl.jqno.equalsverifier.EqualsVerifier;
    1411import nl.jqno.equalsverifier.Warning;
     
    1815 */
    1916class GpxExtensionTest {
    20 
    21     /**
    22      * Setup test.
    23      */
    24     @RegisterExtension
    25     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    26     public JOSMTestRules test = new JOSMTestRules();
    27 
    2817    /**
    2918     * Unit test of methods {@link GpxExtension#equals} and {@link GpxExtension#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxImageCorrelationTest.java

    r18690 r18853  
    1818import org.junit.jupiter.api.TestInstance.Lifecycle;
    1919import org.junit.jupiter.api.TestMethodOrder;
    20 import org.junit.jupiter.api.extension.RegisterExtension;
    2120import org.openstreetmap.josm.TestUtils;
    2221import org.openstreetmap.josm.data.coor.CachedLatLon;
     
    2524import org.openstreetmap.josm.spi.preferences.Config;
    2625import org.openstreetmap.josm.spi.preferences.IPreferences;
    27 import org.openstreetmap.josm.testutils.JOSMTestRules;
     26import org.openstreetmap.josm.testutils.annotations.Timezone;
    2827import org.openstreetmap.josm.tools.date.DateUtils;
    29 import org.openstreetmap.josm.tools.date.DateUtilsTest;
    3028import org.xml.sax.SAXException;
    31 
    32 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    3329
    3430/**
    3531 * Unit tests of {@link GpxImageCorrelation} class.
    3632 */
     33@TestInstance(Lifecycle.PER_CLASS)
    3734@TestMethodOrder(MethodName.class)
    38 @TestInstance(Lifecycle.PER_CLASS)
     35@Timezone
    3936class GpxImageCorrelationTest {
    40 
    41     /**
    42      * Setup test.
    43      */
    44     @RegisterExtension
    45     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    46     public JOSMTestRules test = new JOSMTestRules();
    47 
    4837    GpxData gpx;
    4938    GpxImageEntry ib, i0, i1, i2, i3, i4, i5, i6, i7;
     
    5948    public void setUp() throws IOException, SAXException {
    6049        s = Config.getPref();
    61         DateUtilsTest.setTimeZone(DateUtils.UTC);
    6250
    6351        gpx = GpxReaderTest.parseGpxData(TestUtils.getTestDataRoot() + "tracks/tracks.gpx");
     
    10997    /**
    11098     * Tests matching of images to a GPX track.
    111      *
     99     * <p>
    112100     * TEST #1: default settings
    113101     * tag images within 2 minutes to tracks/segments, interpolate between segments only
     
    157145    /**
    158146     * Tests matching of images to a GPX track.
    159      *
     147     * <p>
    160148     * TEST #2: Disable all interpolation and tagging close to tracks. Only i1-i4 are tagged
    161149     */
     
    181169    /**
    182170     * Tests matching of images to a GPX track.
    183      *
     171     * <p>
    184172     * TEST #3: Disable all interpolation and allow tagging within 1 minute of a track. i0-i5 are tagged.
    185173     * i6 will not be tagged, because it's 68 seconds away from the next waypoint in either direction
     
    210198    /**
    211199     * Tests matching of images to a GPX track.
    212      *
     200     * <p>
    213201     * TEST #4: Force tagging (parameter forceTags=true, no change of configuration). All images will be tagged
    214202     * i5-i6 will now be interpolated, therefore it will have an elevation and different coordinates than in tests above
     
    236224    /**
    237225     * Tests matching of images to a GPX track.
    238      *
     226     * <p>
    239227     * TEST #5: Force tagging (parameter forceTags=false, but configuration changed).
    240228     * Results same as #4
     
    273261    /**
    274262     * Tests matching of images to a GPX track.
    275      *
     263     * <p>
    276264     * TEST #6: Disable tagging but allow interpolation when tracks are less than 500m apart. i0-i4 are tagged.
    277265     * i5-i6 will not be tagged, because the tracks are 897m apart.
     
    293281    /**
    294282     * Tests matching of images to a GPX track.
    295      *
     283     * <p>
    296284     * TEST #7: Disable tagging but allow interpolation when tracks are less than 1000m apart. i0-i6 are tagged.
    297285     * i5-i6 will be tagged, because the tracks are 897m apart.
     
    312300    /**
    313301     * Tests matching of images to a GPX track.
    314      *
     302     * <p>
    315303     * TEST #8: Disable tagging but allow interpolation when tracks are less than 2 min apart. i0-i4 are tagged.
    316304     * i5-i6 will not be tagged, because the tracks are 2.5min apart.
     
    331319    /**
    332320     * Tests matching of images to a GPX track.
    333      *
     321     * <p>
    334322     * TEST #9: Disable tagging but allow interpolation when tracks are less than 3 min apart. i0-i6 are tagged.
    335323     * i5-i6 will be tagged, because the tracks are 2.5min apart.
  • trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxImageEntryTest.java

    r17275 r18853  
    44import java.io.File;
    55
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    76import org.junit.jupiter.api.Test;
    87import org.openstreetmap.josm.TestUtils;
    9 import org.openstreetmap.josm.testutils.JOSMTestRules;
    108
    11 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    129import nl.jqno.equalsverifier.EqualsVerifier;
    1310import nl.jqno.equalsverifier.Warning;
     
    1714 */
    1815class GpxImageEntryTest {
    19 
    20     /**
    21      * Setup test.
    22      */
    23     @RegisterExtension
    24     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    25     public JOSMTestRules test = new JOSMTestRules();
    26 
    2716    /**
    2817     * Unit test of methods {@link GpxImageEntry#equals} and {@link GpxImageEntry#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxOffsetTest.java

    r17275 r18853  
    66import java.text.ParseException;
    77
    8 import org.junit.jupiter.api.BeforeAll;
    98import org.junit.jupiter.api.Test;
    10 import org.junit.jupiter.api.extension.RegisterExtension;
    11 import org.openstreetmap.josm.testutils.JOSMTestRules;
    12 import org.openstreetmap.josm.tools.date.DateUtils;
    13 import org.openstreetmap.josm.tools.date.DateUtilsTest;
    14 
    15 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
     9import org.openstreetmap.josm.testutils.annotations.Timezone;
    1610
    1711/**
    1812 * Unit tests of {@link GpxTimeOffset} class.
    1913 */
     14@Timezone
    2015class GpxOffsetTest {
    21 
    22     /**
    23      * Setup test.
    24      */
    25     @RegisterExtension
    26     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    27     public JOSMTestRules test = new JOSMTestRules();
    28 
    29     /**
    30      * Setup test.
    31      */
    32     @BeforeAll
    33     public static void setUp() {
    34         DateUtilsTest.setTimeZone(DateUtils.UTC);
    35     }
    36 
    3716    /**
    3817     * Unit test of {@link GpxTimeOffset#formatOffset}.
  • trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxRouteTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.data.gpx;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
    76import org.openstreetmap.josm.data.coor.LatLon;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    97
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    118import nl.jqno.equalsverifier.EqualsVerifier;
    129import nl.jqno.equalsverifier.Warning;
     
    1613 */
    1714class GpxRouteTest {
    18 
    19     /**
    20      * Setup test.
    21      */
    22     @RegisterExtension
    23     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    24     public JOSMTestRules test = new JOSMTestRules();
    25 
    2615    /**
    2716     * Unit test of methods {@link GpxRoute#equals} and {@link GpxRoute#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxTimezoneTest.java

    r17275 r18853  
    66import java.text.ParseException;
    77
    8 import org.junit.jupiter.api.BeforeAll;
    98import org.junit.jupiter.api.Test;
    10 import org.junit.jupiter.api.extension.RegisterExtension;
    11 import org.openstreetmap.josm.testutils.JOSMTestRules;
    12 import org.openstreetmap.josm.tools.date.DateUtils;
    13 import org.openstreetmap.josm.tools.date.DateUtilsTest;
    14 
    15 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
     9import org.openstreetmap.josm.testutils.annotations.Timezone;
    1610
    1711/**
    1812 * Unit tests of {@link GpxTimezone} class.
    1913 */
     14@Timezone
    2015class GpxTimezoneTest {
    21 
    22     /**
    23      * Setup test.
    24      */
    25     @RegisterExtension
    26     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    27     public JOSMTestRules test = new JOSMTestRules();
    28 
    29     /**
    30      * Setup test.
    31      */
    32     @BeforeAll
    33     public static void setUp() {
    34         DateUtilsTest.setTimeZone(DateUtils.UTC);
    35     }
    36 
    3716    /**
    3817     * Unit test of {@link GpxTimezone#formatTimezone}.
  • trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxTrackSegmentTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.data.gpx;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
    76import org.openstreetmap.josm.data.coor.LatLon;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    97
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    118import nl.jqno.equalsverifier.EqualsVerifier;
    129import nl.jqno.equalsverifier.Warning;
     
    1613 */
    1714class GpxTrackSegmentTest {
    18 
    19     /**
    20      * Setup test.
    21      */
    22     @RegisterExtension
    23     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    24     public JOSMTestRules test = new JOSMTestRules();
    25 
    2615    /**
    2716     * Unit test of methods {@link GpxTrackSegment#equals} and {@link GpxTrackSegment#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxTrackTest.java

    r18287 r18853  
    1010
    1111import org.junit.jupiter.api.Test;
    12 import org.junit.jupiter.api.extension.RegisterExtension;
    1312import org.openstreetmap.josm.TestUtils;
    14 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1513import org.openstreetmap.josm.tools.ListenerList;
    1614
    17 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1815import nl.jqno.equalsverifier.EqualsVerifier;
    1916import nl.jqno.equalsverifier.Warning;
     
    2320 */
    2421class GpxTrackTest {
    25 
    26     /**
    27      * Setup test.
    28      */
    29     @RegisterExtension
    30     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    31     public JOSMTestRules test = new JOSMTestRules();
    32 
    3322    /**
    3423     * Tests whether the track can read and write colors.
  • trunk/test/unit/org/openstreetmap/josm/data/gpx/WayPointTest.java

    r17715 r18853  
    22package org.openstreetmap.josm.data.gpx;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
     4import static org.junit.jupiter.api.Assertions.assertEquals;
     5import static org.junit.jupiter.api.Assertions.assertNotEquals;
     6
     7import java.time.Instant;
     8
    59import org.junit.jupiter.api.Test;
    610import org.openstreetmap.josm.TestUtils;
    711import org.openstreetmap.josm.data.coor.LatLon;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    912
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1113import nl.jqno.equalsverifier.EqualsVerifier;
    1214import nl.jqno.equalsverifier.Warning;
    13 
    14 import java.time.Instant;
    15 
    16 import static org.junit.jupiter.api.Assertions.assertEquals;
    17 import static org.junit.jupiter.api.Assertions.assertNotEquals;
    1815
    1916/**
     
    2118 */
    2219class WayPointTest {
    23 
    24     /**
    25      * Setup test.
    26      */
    27     @RegisterExtension
    28     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    29     public JOSMTestRules test = new JOSMTestRules();
    30 
    3120    /**
    3221     * Unit test of methods {@link WayPoint#equals} and {@link WayPoint#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/data/gpx/WithAttributesTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.data.gpx;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
    7 import org.openstreetmap.josm.testutils.JOSMTestRules;
    86
    9 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    107import nl.jqno.equalsverifier.EqualsVerifier;
    118import nl.jqno.equalsverifier.Warning;
     
    1512 */
    1613class WithAttributesTest {
    17 
    18     /**
    19      * Setup test.
    20      */
    21     @RegisterExtension
    22     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    23     public JOSMTestRules test = new JOSMTestRules();
    24 
    2514    /**
    2615     * Unit test of methods {@link WithAttributes#equals} and {@link WithAttributes#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/data/imagery/GetCapabilitiesParseHelperTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertEquals;
    55
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    97
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    118import net.trajano.commons.testing.UtilityClassTestUtil;
    129
     
    1512 */
    1613class GetCapabilitiesParseHelperTest {
    17 
    18     /**
    19      * Setup tests
    20      */
    21     @RegisterExtension
    22     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    23     public JOSMTestRules test = new JOSMTestRules();
    24 
    2514    /**
    2615     * Tests that {@code GetCapabilitiesParseHelper} satisfies utility class criteria.
  • trunk/test/unit/org/openstreetmap/josm/data/imagery/ImageryInfoTest.java

    r17275 r18853  
    1111
    1212import org.junit.jupiter.api.Test;
    13 import org.junit.jupiter.api.extension.RegisterExtension;
    1413import org.openstreetmap.josm.data.StructUtils;
    15 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1614import org.openstreetmap.josm.tools.MultiMap;
    17 
    18 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1915
    2016/**
     
    2420 */
    2521class ImageryInfoTest {
    26 
    27     /**
    28      * Setup tests
    29      */
    30     @RegisterExtension
    31     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    32     public JOSMTestRules test = new JOSMTestRules();
    33 
    3422    /**
    3523     * Test if extended URL is returned properly
  • trunk/test/unit/org/openstreetmap/josm/data/imagery/vectortile/mapbox/MVTTileTest.java

    r17862 r18853  
    99import java.util.stream.Stream;
    1010
     11import org.awaitility.Awaitility;
     12import org.awaitility.Durations;
     13import org.junit.jupiter.api.BeforeEach;
     14import org.junit.jupiter.params.ParameterizedTest;
     15import org.junit.jupiter.params.provider.Arguments;
     16import org.junit.jupiter.params.provider.MethodSource;
    1117import org.openstreetmap.gui.jmapviewer.Tile;
    1218import org.openstreetmap.gui.jmapviewer.interfaces.TileJob;
     
    1521import org.openstreetmap.josm.data.imagery.ImageryInfo;
    1622import org.openstreetmap.josm.data.imagery.TileJobOptions;
    17 import org.openstreetmap.josm.testutils.JOSMTestRules;
    18 
    19 import org.awaitility.Awaitility;
    20 import org.awaitility.Durations;
    21 import org.junit.jupiter.api.BeforeEach;
    22 import org.junit.jupiter.api.extension.RegisterExtension;
    23 import org.junit.jupiter.params.ParameterizedTest;
    24 import org.junit.jupiter.params.provider.Arguments;
    25 import org.junit.jupiter.params.provider.MethodSource;
    2623
    2724/**
    2825 * Test class for {@link MVTTile}
    2926 */
    30 public class MVTTileTest {
     27class MVTTileTest {
    3128    private MapboxVectorTileSource tileSource;
    3229    private MapboxVectorCachedTileLoader loader;
    33     @RegisterExtension
    34     JOSMTestRules rule = new JOSMTestRules();
    3530    @BeforeEach
    3631    void setup() {
  • trunk/test/unit/org/openstreetmap/josm/data/notes/NoteCommentTest.java

    r17712 r18853  
    88import java.time.Instant;
    99
    10 import org.junit.jupiter.api.extension.RegisterExtension;
    1110import org.junit.jupiter.api.Test;
    12 import org.openstreetmap.josm.testutils.JOSMTestRules;
    13 
    14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1511
    1612/**
     
    1814 */
    1915class NoteCommentTest {
    20 
    21     /**
    22      * Setup test.
    23      */
    24     @RegisterExtension
    25     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    26     public JOSMTestRules test = new JOSMTestRules();
    27 
    2816    /**
    2917     * Unit test of {@link NoteComment} class.
  • trunk/test/unit/org/openstreetmap/josm/data/notes/NoteTest.java

    r17837 r18853  
    88import java.util.List;
    99
    10 import org.junit.jupiter.api.extension.RegisterExtension;
    1110import org.junit.jupiter.api.Test;
    1211import org.openstreetmap.josm.TestUtils;
    1312import org.openstreetmap.josm.data.coor.LatLon;
    1413import org.openstreetmap.josm.io.NoteReader;
    15 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1614
    17 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1815import nl.jqno.equalsverifier.EqualsVerifier;
    1916import nl.jqno.equalsverifier.Warning;
     
    2320 */
    2421class NoteTest {
    25 
    26     /**
    27      * Setup test.
    28      */
    29     @RegisterExtension
    30     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    31     public JOSMTestRules test = new JOSMTestRules();
    32 
    3322    /**
    3423     * Unit test of {@link Note#toString} method.
  • trunk/test/unit/org/openstreetmap/josm/data/oauth/OAuthParametersTest.java

    r17275 r18853  
    66import static org.junit.jupiter.api.Assertions.assertNotNull;
    77
    8 import org.junit.jupiter.api.extension.RegisterExtension;
    98import org.junit.jupiter.api.Test;
    109import org.openstreetmap.josm.TestUtils;
    1110import org.openstreetmap.josm.spi.preferences.Config;
    12 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1311import org.openstreetmap.josm.tools.Logging;
    1412
     
    2018 */
    2119class OAuthParametersTest {
    22 
    23     /**
    24      * Setup test.
    25      */
    26     @RegisterExtension
    27     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    28     public JOSMTestRules test = new JOSMTestRules();
    29 
    3020    /**
    3121     * Unit test of method {@link OAuthParameters#createDefault}.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/AbstractPrimitiveTest.java

    r17275 r18853  
    77import java.util.Collections;
    88
    9 import org.junit.jupiter.api.extension.RegisterExtension;
    109import org.junit.jupiter.api.Test;
    11 import org.openstreetmap.josm.testutils.JOSMTestRules;
    12 
    13 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1410
    1511/**
     
    1713 */
    1814class AbstractPrimitiveTest {
    19 
    20     /**
    21      * Setup test.
    22      */
    23     @RegisterExtension
    24     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    25     public JOSMTestRules test = new JOSMTestRules();
    26 
    2715    /**
    2816     * Unit test of {@link AbstractPrimitive#isUndeleted} method.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/BBoxTest.java

    r17752 r18853  
    77import static org.junit.jupiter.api.Assertions.assertTrue;
    88
    9 import org.junit.jupiter.api.extension.RegisterExtension;
    109import org.junit.jupiter.api.Test;
    1110import org.openstreetmap.josm.TestUtils;
    1211import org.openstreetmap.josm.data.coor.LatLon;
    13 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1412
    15 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1613import nl.jqno.equalsverifier.EqualsVerifier;
    1714import nl.jqno.equalsverifier.Warning;
     
    2118 */
    2219class BBoxTest {
    23 
    24     /**
    25      * Setup test.
    26      */
    27     @RegisterExtension
    28     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    29     public JOSMTestRules test = new JOSMTestRules();
    30 
    3120    /**
    3221     * Unit test of methods {@link BBox#equals} and {@link BBox#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/ChangesetCacheTest.java

    r18283 r18853  
    1616import org.junit.jupiter.api.BeforeEach;
    1717import org.junit.jupiter.api.Test;
    18 import org.junit.jupiter.api.extension.RegisterExtension;
    1918import org.openstreetmap.josm.data.UserIdentityManager;
    20 import org.openstreetmap.josm.testutils.JOSMTestRules;
    2119import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
    2220import org.openstreetmap.josm.tools.Logging;
    23 
    24 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2521
    2622/**
     
    2925@BasicPreferences
    3026class ChangesetCacheTest {
    31 
    32     /**
    33      * Setup test.
    34      */
    35     @RegisterExtension
    36     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    37     public JOSMTestRules test = new JOSMTestRules();
    38 
    3927    private static final ChangesetCache cache = ChangesetCache.getInstance();
    4028
     
    4937    }
    5038
    51     abstract class TestListener implements ChangesetCacheListener {
     39    abstract static class TestListener implements ChangesetCacheListener {
    5240
    5341        protected final CountDownLatch latch = new CountDownLatch(1);
     
    7260
    7361    /**
    74      * Unit test of {@link ChangesetCache#ChangesetCache}
     62     * Unit test of {@link ChangesetCache#getInstance()}
    7563     */
    7664    @Test
  • trunk/test/unit/org/openstreetmap/josm/data/osm/ChangesetDataSetTest.java

    r17838 r18853  
    1010import java.util.Iterator;
    1111
    12 import org.junit.jupiter.api.extension.RegisterExtension;
    1312import org.junit.jupiter.api.Test;
    1413import org.openstreetmap.josm.TestUtils;
     
    1716import org.openstreetmap.josm.data.osm.ChangesetDataSet.ChangesetModificationType;
    1817import org.openstreetmap.josm.data.osm.history.HistoryNode;
    19 import org.openstreetmap.josm.testutils.JOSMTestRules;
    2018import org.openstreetmap.josm.tools.Logging;
    21 
    22 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2319
    2420/**
     
    2622 */
    2723class ChangesetDataSetTest {
    28 
    29     /**
    30      * Setup test.
    31      */
    32     @RegisterExtension
    33     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    34     public JOSMTestRules test = new JOSMTestRules();
    35 
    3624    /**
    3725     * Unit test of method {@link ChangesetDataSet#iterator}.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/ChangesetDiscussionCommentTest.java

    r17720 r18853  
    66import java.time.Instant;
    77
    8 import org.junit.jupiter.api.extension.RegisterExtension;
    98import org.junit.jupiter.api.Test;
    10 import org.openstreetmap.josm.testutils.JOSMTestRules;
    11 
    12 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    139
    1410/**
     
    1612 */
    1713class ChangesetDiscussionCommentTest {
    18 
    19     /**
    20      * Setup test.
    21      */
    22     @RegisterExtension
    23     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    24     public JOSMTestRules test = new JOSMTestRules();
    25 
    2614    /**
    2715     * Unit test of {@link ChangesetDiscussionComment} constructor.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/ChangesetTest.java

    r18690 r18853  
    1717import java.util.stream.IntStream;
    1818
    19 import org.junit.jupiter.api.extension.RegisterExtension;
    2019import org.junit.jupiter.api.Test;
    2120import org.openstreetmap.josm.data.Bounds;
    2221import org.openstreetmap.josm.data.coor.LatLon;
    23 import org.openstreetmap.josm.testutils.JOSMTestRules;
    2422import org.openstreetmap.josm.tools.Logging;
    2523
     
    3028 */
    3129class ChangesetTest {
    32 
    33     /**
    34      * Setup test.
    35      */
    36     @RegisterExtension
    37     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    38     public JOSMTestRules test = new JOSMTestRules();
    39 
    4030    /**
    4131     * Unit test of method {@link Changeset#setKeys}.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/DataIntegrityProblemExceptionTest.java

    r17275 r18853  
    55import static org.junit.jupiter.api.Assertions.assertNull;
    66
    7 import org.junit.jupiter.api.extension.RegisterExtension;
    87import org.junit.jupiter.api.Test;
    9 import org.openstreetmap.josm.testutils.JOSMTestRules;
    10 
    11 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    128
    139/**
     
    1511 */
    1612class DataIntegrityProblemExceptionTest {
    17 
    18     /**
    19      * Setup test.
    20      */
    21     @RegisterExtension
    22     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    23     public JOSMTestRules test = new JOSMTestRules();
    24 
    2513    /**
    2614     * Unit test of {@link DataIntegrityProblemException} constructor.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetMergerTest.java

    r18690 r18853  
    1818import org.junit.jupiter.api.BeforeEach;
    1919import org.junit.jupiter.api.Test;
    20 import org.junit.jupiter.api.extension.RegisterExtension;
    2120import org.openstreetmap.josm.data.coor.LatLon;
    2221import org.openstreetmap.josm.data.projection.ProjectionRegistry;
    2322import org.openstreetmap.josm.data.projection.Projections;
    2423import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
    25 import org.openstreetmap.josm.testutils.JOSMTestRules;
    26 
    27 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2824
    2925/**
     
    3127 */
    3228class DataSetMergerTest {
    33 
    34     /**
    35      * Setup test.
    36      */
    37     @RegisterExtension
    38     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    39     public JOSMTestRules test = new JOSMTestRules();
    40 
    4129    private DataSet my;
    4230    private DataSet their;
     
    7664    /**
    7765     * two identical nodes, even in id and version. No conflict expected.
    78      *
     66     * <p>
    7967     * Can happen if data is loaded in two layers and then merged from one layer
    8068     * on the other.
     
    150138     * Node with same id, my is modified, their has a higher version
    151139     * => results in a conflict
    152      *
     140     * <p>
    153141     * Use case: node which is modified locally and updated by another mapper on
    154142     * the server
     
    184172     * node with same id, my is deleted, their has a higher version
    185173     * => results in a conflict
    186      *
     174     * <p>
    187175     * Use case: node which is deleted locally and updated by another mapper on
    188176     * the server
     
    243231    /**
    244232     * My and their node are new but semantically equal. My node is deleted.
    245      *
     233     * <p>
    246234     * => Ignore my node, no conflict
    247235     */
     
    266254    /**
    267255     * My and their node are new but semantically equal. Both are deleted.
    268      *
     256     * <p>
    269257     * => take mine
    270258     */
     
    291279     * their node has no assigned id (id == 0) and is semantically equal to one of my
    292280     * nodes with id == 0
    293      *
     281     * <p>
    294282     * => merge it onto my node.
    295283     */
     
    331319    /**
    332320     * my node is incomplete, their node is complete
    333      *
     321     * <p>
    334322     * => merge it onto my node. My node becomes complete
    335323     */
     
    361349     * their way has a higher version and different tags. the nodes are the same. My
    362350     * way is not modified. Merge is possible. No conflict.
    363      *
     351     * <p>
    364352     * => merge it onto my way.
    365353     */
     
    433421     * their way has a higher version and different tags. And it has more nodes. Two
    434422     * of the existing nodes are modified.
    435      *
     423     * <p>
    436424     * => merge it onto my way, no conflict
    437425     */
     
    494482
    495483        assertSame(merged.getNode(0), n1);
    496         assertNotSame(merged.getNode(1), n5); // must be clone of the original node in their
     484        assertNotSame(merged.getNode(1), n5); // must be a clone of the original node in their
    497485        assertSame(merged.getNode(2), n2);
    498486
     
    502490    /**
    503491     * their way has a higher version and different nodes. My way is modified.
    504      *
     492     * <p>
    505493     * => merge onto my way not possible, create a conflict
    506494     */
     
    566554    /**
    567555     * their way is not visible anymore.
    568      *
     556     * <p>
    569557     * => conflict
    570558     */
     
    719707     * My dataset includes a deleted node.
    720708     * Their dataset includes a way with three nodes, the first one being my node.
    721      *
     709     * <p>
    722710     * => the merged way should include all three nodes. Deleted node should have deleted=false and
    723711     * special conflict with isDeleted should exist
     
    773761     * My dataset includes a deleted node.
    774762     * Their dataset includes a relation with three nodes, the first one being my node.
    775      *
     763     * <p>
    776764     * => the merged relation should include all three nodes. There should be conflict for deleted
    777765     * node with isMyDeleted set
     
    823811    /**
    824812     * Merge an incomplete way with two incomplete nodes into an empty dataset.
    825      *
     813     * <p>
    826814     * Use case: a way loaded with a multiget, i.e. GET /api/0.6/ways?ids=123456
    827815     */
     
    865853    /**
    866854     * Merge an incomplete way with two incomplete nodes into a dataset where the way already exists as complete way.
    867      *
    868      * Use case: a way loaded with a multiget, i.e. GET /api/0.6/ways?ids=123456 after a "Update selection " of this way
     855     * <p>
     856     * Use case: a way loaded with a multiget, i.e. GET /api/0.6/ways?ids=123456 after an "Update selection " of this way
    869857     */
    870858    @Test
     
    928916        // -- source dataset
    929917
    930         // an complete node
     918        // a complete node
    931919        Node n1 = new Node(1, 1);
    932920        n1.setCoor(new LatLon(1, 1));
     
    992980
    993981        // --- target dataset
    994         // an complete node
     982        // a complete node
    995983        Node n1b = new Node(1, 2);
    996984        n1b.setCoor(new LatLon(1, 1));
     
    10981086
    10991087    /**
    1100      * Dependency loop in relations,, both deleted in source
     1088     * Dependency loop in relations, both deleted in source
    11011089     * => make sure that DataIntegrityProblemException is thrown.
    11021090     */
  • trunk/test/unit/org/openstreetmap/josm/data/osm/DataSetTest.java

    r18690 r18853  
    1414
    1515import org.junit.jupiter.api.Test;
    16 import org.junit.jupiter.api.extension.RegisterExtension;
    1716import org.openstreetmap.josm.TestUtils;
    1817import org.openstreetmap.josm.data.Bounds;
     
    2120import org.openstreetmap.josm.data.osm.event.DataSourceAddedEvent;
    2221import org.openstreetmap.josm.data.osm.event.DataSourceRemovedEvent;
    23 import org.openstreetmap.josm.testutils.JOSMTestRules;
    24 
    25 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2622
    2723/**
     
    2925 */
    3026class DataSetTest {
    31 
    32     /**
    33      * Setup test.
    34      */
    35     @RegisterExtension
    36     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    37     public JOSMTestRules test = new JOSMTestRules();
    38 
    3927    /**
    4028     * Unit test of method {@link DataSet#searchRelations}.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java

    r18690 r18853  
    1616import java.util.List;
    1717
    18 import org.junit.jupiter.api.extension.RegisterExtension;
    1918import org.junit.jupiter.api.Test;
    2019import org.openstreetmap.josm.TestUtils;
     
    2524import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
    2625import org.openstreetmap.josm.io.OsmReader;
    27 import org.openstreetmap.josm.testutils.JOSMTestRules;
    28 
    29 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
     26
    3027import nl.jqno.equalsverifier.EqualsVerifier;
    3128import nl.jqno.equalsverifier.Warning;
     
    3532 */
    3633class FilterTest {
    37 
    38     /**
    39      * Setup test.
    40      */
    41     @RegisterExtension
    42     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    43     public JOSMTestRules test = new JOSMTestRules();
    44 
    4534    @Test
    4635    void testBasic() throws SearchParseError {
  • trunk/test/unit/org/openstreetmap/josm/data/osm/NodeGraphTest.java

    r17275 r18853  
    99import java.util.List;
    1010
    11 import org.junit.jupiter.api.extension.RegisterExtension;
    1211import org.junit.jupiter.api.Test;
    13 import org.openstreetmap.josm.testutils.JOSMTestRules;
    14 
    15 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1612
    1713/**
     
    1915 */
    2016class NodeGraphTest {
    21 
    22     /**
    23      * Setup test.
    24      */
    25     @RegisterExtension
    26     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    27     public JOSMTestRules test = new JOSMTestRules();
    28 
    2917    /**
    3018     * Unit test of {@link NodeGraph#buildNodePairs} and {@link NodeGraph#eliminateDuplicateNodePairs}
  • trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveKeyHandlingTest.java

    r18690 r18853  
    77import static org.junit.jupiter.api.Assertions.assertTrue;
    88
    9 import org.junit.jupiter.api.extension.RegisterExtension;
     9import java.util.Collections;
     10import java.util.HashSet;
     11
    1012import org.junit.jupiter.api.Test;
    1113import org.openstreetmap.josm.data.coor.LatLon;
    12 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1314
    1415import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    15 
    16 import java.util.Collections;
    17 import java.util.HashSet;
    1816
    1917/**
     
    2220 */
    2321class OsmPrimitiveKeyHandlingTest {
    24 
    25     /**
    26      * Setup test.
    27      */
    28     @RegisterExtension
    29     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    30     public JOSMTestRules test = new JOSMTestRules();
    31 
    3222    /**
    3323     * test query and get methods on a node withouth keys
  • trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveTest.java

    r18690 r18853  
    1010import org.junit.jupiter.api.BeforeAll;
    1111import org.junit.jupiter.api.Test;
    12 import org.junit.jupiter.api.extension.RegisterExtension;
    1312import org.openstreetmap.josm.data.coor.LatLon;
    1413import org.openstreetmap.josm.data.projection.ProjectionRegistry;
    1514import org.openstreetmap.josm.data.projection.Projections;
    16 import org.openstreetmap.josm.testutils.JOSMTestRules;
    17 
    18 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1915
    2016/**
     
    2218 */
    2319class OsmPrimitiveTest {
    24 
    25     /**
    26      * Setup test.
    27      */
    28     @RegisterExtension
    29     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    30     public JOSMTestRules test = new JOSMTestRules();
    31 
    3220    private void compareReferrers(OsmPrimitive actual, OsmPrimitive... expected) {
    3321        assertEquals(new HashSet<>(Arrays.asList(expected)), new HashSet<>(actual.getReferrers()));
  • trunk/test/unit/org/openstreetmap/josm/data/osm/OsmPrimitiveTypeTest.java

    r18690 r18853  
    66import static org.junit.jupiter.api.Assertions.assertNull;
    77import static org.junit.jupiter.api.Assertions.assertSame;
     8import static org.junit.jupiter.api.Assertions.assertThrows;
    89import static org.junit.jupiter.api.Assertions.assertTrue;
    9 import static org.junit.jupiter.api.Assertions.assertThrows;
    1010
    1111import java.util.Collection;
    1212
    1313import org.junit.jupiter.api.Test;
    14 import org.junit.jupiter.api.extension.RegisterExtension;
    1514import org.openstreetmap.josm.TestUtils;
    16 import org.openstreetmap.josm.testutils.JOSMTestRules;
    17 
    18 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1915
    2016/**
     
    2218 */
    2319class OsmPrimitiveTypeTest {
    24 
    25     /**
    26      * Setup test.
    27      */
    28     @RegisterExtension
    29     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    30     public JOSMTestRules test = new JOSMTestRules();
    31 
    3220    /**
    3321     * Unit test of {@link OsmPrimitiveType} enum.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/OsmUtilsTest.java

    r18690 r18853  
    66import static org.junit.jupiter.api.Assertions.assertInstanceOf;
    77import static org.junit.jupiter.api.Assertions.assertNull;
     8import static org.junit.jupiter.api.Assertions.assertThrows;
    89import static org.junit.jupiter.api.Assertions.assertTrue;
    9 import static org.junit.jupiter.api.Assertions.assertThrows;
    1010
    1111import java.util.Arrays;
     
    1313
    1414import org.junit.jupiter.api.Test;
    15 import org.junit.jupiter.api.extension.RegisterExtension;
    16 import org.openstreetmap.josm.testutils.JOSMTestRules;
    17 
    18 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1915
    2016/**
     
    2218 */
    2319class OsmUtilsTest {
    24 
    25     /**
    26      * Setup test.
    27      */
    28     @RegisterExtension
    29     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    30     public JOSMTestRules test = new JOSMTestRules();
    31 
    3220    /**
    3321     * Unit test of {@link OsmUtils#createPrimitive}
  • trunk/test/unit/org/openstreetmap/josm/data/osm/QuadBucketsTest.java

    r18690 r18853  
    1919import java.util.Random;
    2020
    21 import org.junit.jupiter.api.extension.RegisterExtension;
    2221import org.junit.jupiter.api.Test;
    2322import org.openstreetmap.josm.data.coor.LatLon;
     
    2625import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
    2726import org.openstreetmap.josm.io.OsmReader;
    28 import org.openstreetmap.josm.testutils.JOSMTestRules;
    29 
    30 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    3127
    3228/**
     
    3430 */
    3531class QuadBucketsTest {
    36 
    37     /**
    38      * Setup test.
    39      */
    40     @RegisterExtension
    41     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    42     public JOSMTestRules test = new JOSMTestRules();
    43 
    4432    @SuppressWarnings("unchecked")
    4533    private void removeAllTest(DataSet ds) throws ReflectiveOperationException {
  • trunk/test/unit/org/openstreetmap/josm/data/osm/RelationTest.java

    r18690 r18853  
    44import static org.junit.jupiter.api.Assertions.assertEquals;
    55import static org.junit.jupiter.api.Assertions.assertFalse;
     6import static org.junit.jupiter.api.Assertions.assertThrows;
    67import static org.junit.jupiter.api.Assertions.assertTrue;
    7 import static org.junit.jupiter.api.Assertions.assertThrows;
    88
    99import org.junit.jupiter.api.Test;
    10 import org.junit.jupiter.api.extension.RegisterExtension;
    1110import org.openstreetmap.josm.data.coor.LatLon;
    12 import org.openstreetmap.josm.testutils.JOSMTestRules;
    13 
    14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1511
    1612class RelationTest {
    17 
    18     /**
    19      * Setup test.
    20      */
    21     @RegisterExtension
    22     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    23     public JOSMTestRules test = new JOSMTestRules();
    24 
    2513    @Test
    2614    void testCreateNewRelation() {
  • trunk/test/unit/org/openstreetmap/josm/data/osm/StorageTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.data.osm;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
    7 import org.openstreetmap.josm.testutils.JOSMTestRules;
    86
    9 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    107import nl.jqno.equalsverifier.EqualsVerifier;
    118import nl.jqno.equalsverifier.Warning;
     
    1512 */
    1613class StorageTest {
    17 
    18     /**
    19      * Setup test.
    20      */
    21     @RegisterExtension
    22     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    23     public JOSMTestRules test = new JOSMTestRules();
    24 
    2514    /**
    2615     * Unit test of methods {@link Storage#equals} and {@link Storage#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/UserTest.java

    r17275 r18853  
    66import static org.junit.jupiter.api.Assertions.assertTrue;
    77
    8 import org.junit.jupiter.api.extension.RegisterExtension;
    98import org.junit.jupiter.api.Test;
    10 import org.openstreetmap.josm.testutils.JOSMTestRules;
    11 
    12 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    139
    1410/**
     
    1612 */
    1713class UserTest {
    18 
    19     /**
    20      * Setup test
    21      */
    22     @RegisterExtension
    23     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    24     public JOSMTestRules test = new JOSMTestRules();
    25 
    2614    /**
    2715     * Test method for {@link User#createOsmUser}.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/WaySegmentTest.java

    r18690 r18853  
    77import java.util.Arrays;
    88
    9 import org.junit.jupiter.api.extension.RegisterExtension;
    109import org.junit.jupiter.api.Test;
    1110import org.openstreetmap.josm.data.coor.LatLon;
    12 import org.openstreetmap.josm.testutils.JOSMTestRules;
    13 
    14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1511
    1612/**
     
    1814 */
    1915class WaySegmentTest {
    20 
    21     /**
    22      * Setup test.
    23      */
    24     @RegisterExtension
    25     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    26     public JOSMTestRules test = new JOSMTestRules();
    27 
    2816    @Test
    2917    void testForNodePair() {
  • trunk/test/unit/org/openstreetmap/josm/data/osm/WayTest.java

    r18553 r18853  
    44import static org.junit.jupiter.api.Assertions.assertEquals;
    55import static org.junit.jupiter.api.Assertions.assertFalse;
     6import static org.junit.jupiter.api.Assertions.assertThrows;
    67import static org.junit.jupiter.api.Assertions.assertTrue;
    7 import static org.junit.jupiter.api.Assertions.assertThrows;
    88
    99import java.util.Arrays;
     
    1111import java.util.HashSet;
    1212
    13 import org.junit.jupiter.api.BeforeAll;
    1413import org.junit.jupiter.api.Test;
    15 import org.openstreetmap.josm.JOSMFixture;
    1614import org.openstreetmap.josm.data.coor.LatLon;
    1715
     
    2119 */
    2220class WayTest {
    23 
    24     /**
    25      * Setup test.
    26      */
    27     @BeforeAll
    28     public static void setUpBeforeClass() {
    29         JOSMFixture.createUnitTestFixture().init();
    30     }
    31 
    3221    /**
    3322     * Test BBox calculation with Way
  • trunk/test/unit/org/openstreetmap/josm/data/osm/event/ChangesetIdChangedEventTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertEquals;
    55
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    9 
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    117
    128/**
     
    1410 */
    1511class ChangesetIdChangedEventTest {
    16 
    17     /**
    18      * Setup test.
    19      */
    20     @RegisterExtension
    21     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    22     public JOSMTestRules test = new JOSMTestRules();
    23 
    2412    /**
    2513     * Unit test of {@link ChangesetIdChangedEvent#toString}.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/event/DataChangedEventTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertEquals;
    55
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    9 
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    117
    128/**
     
    1410 */
    1511class DataChangedEventTest {
    16 
    17     /**
    18      * Setup test.
    19      */
    20     @RegisterExtension
    21     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    22     public JOSMTestRules test = new JOSMTestRules();
    23 
    2412    /**
    2513     * Unit test of {@link DataChangedEvent#toString}.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/event/NodeMovedEventTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertEquals;
    55
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    9 
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    117
    128/**
     
    1410 */
    1511class NodeMovedEventTest {
    16 
    17     /**
    18      * Setup test.
    19      */
    20     @RegisterExtension
    21     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    22     public JOSMTestRules test = new JOSMTestRules();
    23 
    2412    /**
    2513     * Unit test of {@link NodeMovedEvent#toString}.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/event/PrimitiveFlagsChangedEventTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertEquals;
    55
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    9 
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    117
    128/**
     
    1410 */
    1511class PrimitiveFlagsChangedEventTest {
    16 
    17     /**
    18      * Setup test.
    19      */
    20     @RegisterExtension
    21     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    22     public JOSMTestRules test = new JOSMTestRules();
    23 
    2412    /**
    2513     * Unit test of {@link PrimitiveFlagsChangedEvent#toString}.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/event/PrimitivesAddedEventTest.java

    r17275 r18853  
    66import java.util.Collections;
    77
    8 import org.junit.jupiter.api.extension.RegisterExtension;
    98import org.junit.jupiter.api.Test;
    10 import org.openstreetmap.josm.testutils.JOSMTestRules;
    11 
    12 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    139
    1410/**
     
    1612 */
    1713class PrimitivesAddedEventTest {
    18 
    19     /**
    20      * Setup test.
    21      */
    22     @RegisterExtension
    23     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    24     public JOSMTestRules test = new JOSMTestRules();
    25 
    2614    /**
    2715     * Unit test of {@link PrimitivesAddedEvent#toString}.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/event/PrimitivesRemovedEventTest.java

    r17275 r18853  
    66import java.util.Collections;
    77
    8 import org.junit.jupiter.api.extension.RegisterExtension;
    98import org.junit.jupiter.api.Test;
    10 import org.openstreetmap.josm.testutils.JOSMTestRules;
    11 
    12 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    139
    1410/**
     
    1612 */
    1713class PrimitivesRemovedEventTest {
    18 
    19     /**
    20      * Setup test.
    21      */
    22     @RegisterExtension
    23     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    24     public JOSMTestRules test = new JOSMTestRules();
    25 
    2614    /**
    2715     * Unit test of {@link PrimitivesRemovedEvent#toString}.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/event/RelationMembersChangedEventTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertEquals;
    55
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    9 
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    117
    128/**
     
    1410 */
    1511class RelationMembersChangedEventTest {
    16 
    17     /**
    18      * Setup test.
    19      */
    20     @RegisterExtension
    21     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    22     public JOSMTestRules test = new JOSMTestRules();
    23 
    2412    /**
    2513     * Unit test of {@link RelationMembersChangedEvent#toString}.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/event/TagsChangedEventTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertEquals;
    55
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    9 
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    117
    128/**
     
    1410 */
    1511class TagsChangedEventTest {
    16 
    17     /**
    18      * Setup test.
    19      */
    20     @RegisterExtension
    21     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    22     public JOSMTestRules test = new JOSMTestRules();
    23 
    2412    /**
    2513     * Unit test of {@link TagsChangedEvent#toString}.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/event/WayNodesChangedEventTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertEquals;
    55
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    9 
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    117
    128/**
     
    1410 */
    1511class WayNodesChangedEventTest {
    16 
    17     /**
    18      * Setup test.
    19      */
    20     @RegisterExtension
    21     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    22     public JOSMTestRules test = new JOSMTestRules();
    23 
    2412    /**
    2513     * Unit test of {@link WayNodesChangedEvent#toString}.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryNodeTest.java

    r17838 r18853  
    99import java.util.Map;
    1010
    11 import org.junit.jupiter.api.extension.RegisterExtension;
    1211import org.junit.jupiter.api.Test;
    1312import org.openstreetmap.josm.data.coor.LatLon;
     
    1615import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
    1716import org.openstreetmap.josm.data.osm.User;
    18 import org.openstreetmap.josm.testutils.JOSMTestRules;
    19 
    20 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2117
    2218/**
     
    2420 */
    2521class HistoryNodeTest {
    26 
    27     /**
    28      * Setup test.
    29      */
    30     @RegisterExtension
    31     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    32     public JOSMTestRules test = new JOSMTestRules();
    33 
    3422    private static HistoryNode create(Instant d) {
    3523        return new HistoryNode(
  • trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryRelationTest.java

    r17838 r18853  
    99import java.util.Map;
    1010
    11 import org.junit.jupiter.api.extension.RegisterExtension;
    1211import org.junit.jupiter.api.Test;
    1312import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
     
    1514import org.openstreetmap.josm.data.osm.RelationMemberData;
    1615import org.openstreetmap.josm.data.osm.User;
    17 import org.openstreetmap.josm.testutils.JOSMTestRules;
    18 
    19 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2016
    2117/**
     
    2319 */
    2420class HistoryRelationTest {
    25 
    26     /**
    27      * Setup test.
    28      */
    29     @RegisterExtension
    30     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    31     public JOSMTestRules test = new JOSMTestRules();
    32 
    3321    private static HistoryRelation create(Instant d) {
    3422        return new HistoryRelation(
  • trunk/test/unit/org/openstreetmap/josm/data/osm/history/HistoryWayTest.java

    r18690 r18853  
    1111import java.util.Map;
    1212
    13 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1413import org.junit.jupiter.api.Test;
    15 import org.junit.jupiter.api.extension.RegisterExtension;
    1614import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
    1715import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
    1816import org.openstreetmap.josm.data.osm.User;
    19 import org.openstreetmap.josm.testutils.JOSMTestRules;
    2017
    2118/**
     
    2320 */
    2421class HistoryWayTest {
    25 
    26     /**
    27      * Setup test.
    28      */
    29     @RegisterExtension
    30     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    31     public JOSMTestRules test = new JOSMTestRules();
    32 
    3322    private static HistoryWay create(Instant d) {
    3423        return new HistoryWay(
  • trunk/test/unit/org/openstreetmap/josm/data/osm/search/PushbackTokenizerTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.data.osm.search;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
    76import org.openstreetmap.josm.data.osm.search.PushbackTokenizer.Token;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    9 
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    117
    128/**
     
    1410 */
    1511class PushbackTokenizerTest {
    16 
    17     /**
    18      * Setup rules.
    19      */
    20     @RegisterExtension
    21     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    22     public JOSMTestRules test = new JOSMTestRules();
    23 
    2412    /**
    2513     * Unit test of {@link Token} enum.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchModeTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.data.osm.search;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
    7 import org.openstreetmap.josm.testutils.JOSMTestRules;
    8 
    9 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    106
    117/**
     
    139 */
    1410class SearchModeTest {
    15 
    16     /**
    17      * Setup rules.
    18      */
    19     @RegisterExtension
    20     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    21     public JOSMTestRules test = new JOSMTestRules();
    22 
    2311    /**
    2412     * Unit test of {@link SearchMode} enum.
  • trunk/test/unit/org/openstreetmap/josm/data/osm/visitor/MergeSourceBuildingVisitorTest.java

    r17275 r18853  
    99import java.util.Collection;
    1010
    11 import org.junit.jupiter.api.extension.RegisterExtension;
    1211import org.junit.jupiter.api.Test;
    1312import org.openstreetmap.josm.data.coor.LatLon;
     
    1918import org.openstreetmap.josm.data.osm.RelationMember;
    2019import org.openstreetmap.josm.data.osm.Way;
    21 import org.openstreetmap.josm.testutils.JOSMTestRules;
    22 
    23 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2420
    2521/**
     
    3531                .findFirst().orElse(null);
    3632    }
    37 
    38     /**
    39      * Setup test.
    40      */
    41     @RegisterExtension
    42     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    43     public JOSMTestRules test = new JOSMTestRules();
    4433
    4534    @Test
  • trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java

    r18690 r18853  
    2020
    2121import org.junit.jupiter.api.Assumptions;
    22 import org.junit.jupiter.api.BeforeAll;
    2322import org.junit.jupiter.api.Test;
    2423import org.openstreetmap.josm.JOSMFixture;
     
    3231/**
    3332 * This test is used to monitor changes in projection code.
    34  *
     33 * <p>
    3534 * It keeps a record of test data in the file nodist/data/projection/projection-regression-test-data.
    3635 * This record is generated from the current Projection classes available in JOSM. It needs to
    3736 * be updated, whenever a projection is added / removed or an algorithm is changed, such that
    3837 * the computed values are numerically different. There is no error threshold, every change is reported.
    39  *
     38 * <p>
    4039 * So when this test fails, first check if the change is intended. Then update the regression
    4140 * test data, by running the main method of this class and commit the new data file.
     
    5857     */
    5958    public static void main(String[] args) throws IOException {
    60         setUp();
     59        JOSMFixture.createUnitTestFixture().init();
    6160
    6261        Map<String, Projection> supportedCodesMap = Projections.getAllProjectionCodes().stream()
     
    136135
    137136    /**
    138      * Setup test.
    139      */
    140     @BeforeAll
    141     public static void setUp() {
    142         JOSMFixture.createUnitTestFixture().init();
    143     }
    144 
    145     /**
    146137     * Non-regression unit test.
    147138     * @throws IOException if any I/O error occurs
  • trunk/test/unit/org/openstreetmap/josm/data/projection/proj/LonLatTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertFalse;
    55
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    9 
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    117
    128/**
     
    1410 */
    1511class LonLatTest {
    16     /**
    17      * Setup rule.
    18      */
    19     @RegisterExtension
    20     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    21     public JOSMTestRules test = new JOSMTestRules();
    22 
    2312    /**
    2413     * Test {@link LonLat#lonIsLinearToEast}
  • trunk/test/unit/org/openstreetmap/josm/data/projection/proj/MercatorTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertTrue;
    55
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    9 
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    117
    128/**
     
    1410 */
    1511class MercatorTest {
    16     /**
    17      * Setup rule.
    18      */
    19     @RegisterExtension
    20     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    21     public JOSMTestRules test = new JOSMTestRules();
    22 
    2312    /**
    2413     * Test {@link Mercator#lonIsLinearToEast}
  • trunk/test/unit/org/openstreetmap/josm/data/tagging/ac/AutoCompletionPriorityTest.java

    r17275 r18853  
    1212import java.util.TreeSet;
    1313
    14 import org.junit.jupiter.api.extension.RegisterExtension;
    1514import org.junit.jupiter.api.Test;
    1615import org.openstreetmap.josm.TestUtils;
    17 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1816
    19 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2017import nl.jqno.equalsverifier.EqualsVerifier;
    2118
     
    2421 */
    2522class AutoCompletionPriorityTest {
    26 
    27     /**
    28      * Setup test.
    29      */
    30     @RegisterExtension
    31     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    32     public JOSMTestRules test = new JOSMTestRules();
    33 
    3423    /**
    3524     * Test getters.
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/AddressesTest.java

    r17275 r18853  
    1111import java.util.List;
    1212
    13 import org.junit.jupiter.api.extension.RegisterExtension;
    1413import org.junit.jupiter.api.Test;
    1514import org.openstreetmap.josm.TestUtils;
     
    2019import org.openstreetmap.josm.data.validation.Severity;
    2120import org.openstreetmap.josm.data.validation.TestError;
    22 import org.openstreetmap.josm.testutils.JOSMTestRules;
    23 
    24 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2521
    2622/**
     
    2824 */
    2925class AddressesTest {
    30 
    31     /**
    32      * Setup test.
    33      */
    34     @RegisterExtension
    35     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    36     public JOSMTestRules test = new JOSMTestRules();
    37 
    3826    private static Node createAddressNode(String nodeTags, String wayTags, String relationTags) {
    3927        DataSet ds = new DataSet();
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/CoastlinesTest.java

    r17275 r18853  
    44import java.util.stream.Collectors;
    55
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    9 
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    117
    128/**
     
    1713    private static final Coastlines COASTLINES = new Coastlines();
    1814    private static final WronglyOrderedWays WRONGLY_ORDERED_WAYS = new WronglyOrderedWays();
    19 
    20     /**
    21      * Setup test.
    22      */
    23     @RegisterExtension
    24     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    25     public JOSMTestRules test = new JOSMTestRules();
    2615
    2716    /**
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/ConnectivityRelationsTest.java

    r18690 r18853  
    66import org.junit.jupiter.api.BeforeEach;
    77import org.junit.jupiter.api.Test;
    8 import org.junit.jupiter.api.extension.RegisterExtension;
    98import org.openstreetmap.josm.TestUtils;
    109import org.openstreetmap.josm.data.coor.LatLon;
     
    1211import org.openstreetmap.josm.data.osm.Relation;
    1312import org.openstreetmap.josm.data.osm.RelationMember;
    14 import org.openstreetmap.josm.testutils.JOSMTestRules;
    15 
    16 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1713
    1814/**
     
    2420    private ConnectivityRelations check;
    2521    private static final String CONNECTIVITY = "connectivity";
    26 
    27     /**
    28      * Setup test.
    29      */
    30     @RegisterExtension
    31     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    32     public JOSMTestRules rule = new JOSMTestRules();
    3322
    3423    @BeforeEach
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/DirectionNodesTest.java

    r18801 r18853  
    33
    44import org.junit.jupiter.api.Test;
    5 import org.junit.jupiter.api.extension.RegisterExtension;
    65import org.openstreetmap.josm.data.osm.DataSet;
    7 import org.openstreetmap.josm.testutils.JOSMTestRules;
    8 
    9 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    106
    117/**
     
    139 */
    1410class DirectionNodesTest {
    15 
    16     /**
    17      * Setup test.
    18      */
    19     @RegisterExtension
    20     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    21     public JOSMTestRules test = new JOSMTestRules();
    22 
    2311    /**
    2412     * Test all error cases manually created in direction-nodes.osm.
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/DuplicateNodeTest.java

    r17665 r18853  
    99import org.junit.jupiter.api.Disabled;
    1010import org.junit.jupiter.api.Test;
    11 import org.junit.jupiter.api.extension.RegisterExtension;
    1211import org.openstreetmap.josm.command.Command;
    1312import org.openstreetmap.josm.data.coor.LatLon;
     
    1817import org.openstreetmap.josm.data.validation.TestError;
    1918import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
    20 import org.openstreetmap.josm.testutils.JOSMTestRules;
    21 
    22 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2319
    2420/**
     
    2622 */
    2723class DuplicateNodeTest {
    28 
    29     /**
    30      * Setup test by initializing JOSM preferences and projection.
    31      */
    32     @RegisterExtension
    33     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    34     public JOSMTestRules test = new JOSMTestRules();
    35 
    3624    private static final DuplicateNode TEST = new DuplicateNode();
    3725
     
    180168    /**
    181169     * Test of "Duplicate node" validation test - server precision.
    182      *
     170     * <p>
    183171     * Non-regression test for ticket #18074.
    184172     */
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/DuplicateWayTest.java

    r17275 r18853  
    99import java.nio.file.Paths;
    1010
    11 import org.junit.jupiter.api.extension.RegisterExtension;
    1211import org.junit.jupiter.api.Test;
    1312import org.openstreetmap.josm.TestUtils;
     
    1918import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
    2019import org.openstreetmap.josm.io.OsmReader;
    21 import org.openstreetmap.josm.testutils.JOSMTestRules;
    22 
    23 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2420
    2521/**
     
    2723 */
    2824class DuplicateWayTest {
    29 
    30     /**
    31      * Setup test by initializing JOSM preferences and projection.
    32      */
    33     @RegisterExtension
    34     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    35     public JOSMTestRules test = new JOSMTestRules();
    36 
    3725    private static final DuplicateWay TEST = new DuplicateWay();
    3826
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/HighwaysTest.java

    r17275 r18853  
    1010import java.util.Collection;
    1111
    12 import org.junit.jupiter.api.BeforeEach;
    1312import org.junit.jupiter.api.Test;
    14 import org.openstreetmap.josm.JOSMFixture;
    1513import org.openstreetmap.josm.TestUtils;
    1614import org.openstreetmap.josm.data.coor.LatLon;
     
    2018import org.openstreetmap.josm.data.validation.TestError;
    2119import org.openstreetmap.josm.io.OsmReader;
     20import org.openstreetmap.josm.testutils.annotations.Projection;
    2221
    2322/**
    2423 * Unit test of {@link HighwaysTest}.
    2524 */
     25@Projection
    2626class HighwaysTest {
    27 
    28     /**
    29      * Setup test.
    30      */
    31     @BeforeEach
    32     public void setUp() {
    33         JOSMFixture.createUnitTestFixture().init();
    34     }
    35 
    3627    private static Way createTestSetting(String highway, String highwayLink) {
    3728        DataSet ds = new DataSet();
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/InternetTagsTest.java

    r17275 r18853  
    1010import java.util.List;
    1111
    12 import org.junit.jupiter.api.extension.RegisterExtension;
    1312import org.junit.jupiter.api.Test;
    1413import org.openstreetmap.josm.TestUtils;
     
    1716import org.openstreetmap.josm.data.validation.routines.EmailValidator;
    1817import org.openstreetmap.josm.data.validation.routines.UrlValidator;
    19 import org.openstreetmap.josm.testutils.JOSMTestRules;
    20 
    21 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2218
    2319/**
     
    2723
    2824    private static final InternetTags TEST = new InternetTags();
    29 
    30     /**
    31      * Setup test by initializing JOSM preferences and projection.
    32      */
    33     @RegisterExtension
    34     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    35     public JOSMTestRules test = new JOSMTestRules();
    3625
    3726    /**
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/LanesTest.java

    r17275 r18853  
    77import org.junit.jupiter.api.BeforeEach;
    88import org.junit.jupiter.api.Test;
    9 import org.openstreetmap.josm.JOSMFixture;
    109import org.openstreetmap.josm.data.osm.OsmUtils;
    1110
     
    2322    @BeforeEach
    2423    public void setUp() throws Exception {
    25         JOSMFixture.createUnitTestFixture().init();
    2624        lanes.initialize();
    2725        lanes.startTest(null);
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/LongSegmentTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertEquals;
    55
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    76import org.junit.jupiter.api.Test;
    87import org.openstreetmap.josm.data.coor.LatLon;
    98import org.openstreetmap.josm.data.osm.Node;
    109import org.openstreetmap.josm.data.osm.Way;
    11 import org.openstreetmap.josm.testutils.JOSMTestRules;
    12 
    13 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1410
    1511/**
     
    1713 */
    1814class LongSegmentTest {
    19 
    20     /**
    21      * Setup test.
    22      */
    23     @RegisterExtension
    24     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    25     public JOSMTestRules test = new JOSMTestRules();
    26 
    2715    private static int test(Way w) throws Exception {
    2816        LongSegment test = new LongSegment();
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/NameMismatchTest.java

    r17275 r18853  
    66import java.util.List;
    77
    8 import org.junit.jupiter.api.extension.RegisterExtension;
    98import org.junit.jupiter.api.Test;
    109import org.openstreetmap.josm.data.osm.OsmUtils;
    1110import org.openstreetmap.josm.data.validation.TestError;
    12 import org.openstreetmap.josm.testutils.JOSMTestRules;
    13 
    14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1511
    1612/**
     
    1814 */
    1915class NameMismatchTest {
    20 
    21     /**
    22      * Setup test.
    23      */
    24     @RegisterExtension
    25     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    26     public JOSMTestRules test = new JOSMTestRules();
    27 
    2816    List<TestError> test(String primitive) {
    2917        final NameMismatch test = new NameMismatch();
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/PublicTransportRouteTestTest.java

    r17275 r18853  
    77import java.util.List;
    88
    9 import org.junit.jupiter.api.extension.RegisterExtension;
    109import org.junit.jupiter.api.Test;
    1110import org.openstreetmap.josm.TestUtils;
     
    1413import org.openstreetmap.josm.data.osm.RelationMember;
    1514import org.openstreetmap.josm.data.osm.Way;
    16 import org.openstreetmap.josm.testutils.JOSMTestRules;
    17 
    18 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1915
    2016/**
     
    2420
    2521    final PublicTransportRouteTest test = new PublicTransportRouteTest();
    26 
    27     /**
    28      * Setup test.
    29      */
    30     @RegisterExtension
    31     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    32     public JOSMTestRules rules = new JOSMTestRules();
    3322
    3423    /**
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/SelfIntersectingWayTest.java

    r18801 r18853  
    1111import java.util.stream.IntStream;
    1212
    13 import org.junit.jupiter.api.BeforeAll;
    1413import org.junit.jupiter.api.Test;
    1514import org.junit.jupiter.params.ParameterizedTest;
    1615import org.junit.jupiter.params.provider.Arguments;
    1716import org.junit.jupiter.params.provider.MethodSource;
    18 import org.openstreetmap.josm.JOSMFixture;
    1917import org.openstreetmap.josm.data.coor.LatLon;
    2018import org.openstreetmap.josm.data.osm.Node;
     
    2624 */
    2725class SelfIntersectingWayTest {
    28 
    29     /**
    30      * Setup test.
    31      * @throws Exception if test cannot be initialized
    32      */
    33     @BeforeAll
    34     public static void setUp() throws Exception {
    35         JOSMFixture.createUnitTestFixture().init();
    36     }
    3726
    3827    private static List<Node> createNodes() {
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/SharpAnglesTest.java

    r18619 r18853  
    1313import org.junit.jupiter.params.provider.Arguments;
    1414import org.junit.jupiter.params.provider.MethodSource;
    15 import org.openstreetmap.josm.JOSMFixture;
    1615import org.openstreetmap.josm.TestUtils;
    1716import org.openstreetmap.josm.data.coor.EastNorth;
     
    2019import org.openstreetmap.josm.data.osm.Way;
    2120import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
     21import org.openstreetmap.josm.testutils.annotations.Projection;
    2222
    2323/**
     
    2525 */
    2626@BasicPreferences
     27@Projection
    2728class SharpAnglesTest {
    2829    private SharpAngles angles;
     
    3435    @BeforeEach
    3536    public void setUp() throws Exception {
    36         JOSMFixture.createUnitTestFixture().init();
    3737        angles = new SharpAngles();
    3838        angles.initialize();
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/SimilarNamedWaysTest.java

    r17275 r18853  
    55import static org.junit.jupiter.api.Assertions.assertFalse;
    66
    7 import org.junit.jupiter.api.BeforeEach;
    87import org.junit.jupiter.api.Test;
    9 import org.openstreetmap.josm.JOSMFixture;
    108
    119/**
     
    1513
    1614    private final SimilarNamedWays test = new SimilarNamedWays();
    17 
    18     /**
    19      * Setup test
    20      */
    21     @BeforeEach
    22     public void setUp() {
    23         JOSMFixture.createUnitTestFixture().init();
    24     }
    2515
    2616    private void checkSimilarity(String message, String name1, String name2, boolean expected) {
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/UnconnectedWaysTest.java

    r17275 r18853  
    1414import org.junit.jupiter.api.BeforeEach;
    1515import org.junit.jupiter.api.Test;
    16 import org.openstreetmap.josm.JOSMFixture;
    1716import org.openstreetmap.josm.TestUtils;
    1817import org.openstreetmap.josm.data.osm.DataSet;
     
    2221import org.openstreetmap.josm.io.IllegalDataException;
    2322import org.openstreetmap.josm.io.OsmReader;
     23import org.openstreetmap.josm.testutils.annotations.Projection;
    2424
    2525/**
    2626 * Unit tests of {@code UnconnectedWays} class.
    2727 */
     28@Projection
    2829class UnconnectedWaysTest {
    2930
     
    3738    public void setUp() throws Exception {
    3839        bib = new UnconnectedWays.UnconnectedHighways();
    39         JOSMFixture.createUnitTestFixture().init();
    4040        bib.initialize();
    4141    }
  • trunk/test/unit/org/openstreetmap/josm/data/validation/util/ValUtilTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.data.validation.util;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    6 import org.openstreetmap.josm.testutils.JOSMTestRules;
    75
    8 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    96import net.trajano.commons.testing.UtilityClassTestUtil;
    107
     
    1310 */
    1411class ValUtilTest {
    15 
    16     /**
    17      * Setup test.
    18      */
    19     @RegisterExtension
    20     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    21     public JOSMTestRules test = new JOSMTestRules();
    22 
    2312    /**
    2413     * Tests that {@code ValUtil} satisfies utility class criteria.
  • trunk/test/unit/org/openstreetmap/josm/gui/ConditionalOptionPaneUtilTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.gui;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    6 import org.openstreetmap.josm.testutils.JOSMTestRules;
    75
    8 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    96import net.trajano.commons.testing.UtilityClassTestUtil;
    107
     
    1310 */
    1411class ConditionalOptionPaneUtilTest {
    15 
    16     /**
    17      * Setup rule
    18      */
    19     @RegisterExtension
    20     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    21     public JOSMTestRules test = new JOSMTestRules();
    22 
    2312    /**
    2413     * Tests that {@code ConditionalOptionPaneUtil} satisfies utility class criteria.
  • trunk/test/unit/org/openstreetmap/josm/gui/ExceptionDialogUtilTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.gui;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    6 import org.openstreetmap.josm.testutils.JOSMTestRules;
    75
    8 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    96import net.trajano.commons.testing.UtilityClassTestUtil;
    107
     
    1310 */
    1411class ExceptionDialogUtilTest {
    15 
    16     /**
    17      * Setup rule
    18      */
    19     @RegisterExtension
    20     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    21     public JOSMTestRules test = new JOSMTestRules();
    22 
    2312    /**
    2413     * Tests that {@code ExceptionDialogUtil} satisfies utility class criteria.
  • trunk/test/unit/org/openstreetmap/josm/gui/MapStatusTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.gui;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
    7 import org.openstreetmap.josm.testutils.JOSMTestRules;
    86
    9 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    107import nl.jqno.equalsverifier.EqualsVerifier;
    118
     
    1411 */
    1512class MapStatusTest {
    16 
    17     /**
    18      * Setup test.
    19      */
    20     @RegisterExtension
    21     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    22     public JOSMTestRules test = new JOSMTestRules();
    23 
    2413    /**
    2514     * Unit test of methods {@link MapStatus.StatusTextHistory#equals} and {@link MapStatus.StatusTextHistory#hashCode}.
  • trunk/test/unit/org/openstreetmap/josm/gui/SystemOfMeasurementTest.java

    r17275 r18853  
    88import java.util.Locale;
    99
    10 import org.junit.jupiter.api.BeforeAll;
    1110import org.junit.jupiter.api.Test;
    12 import org.openstreetmap.josm.JOSMFixture;
    1311import org.openstreetmap.josm.data.SystemOfMeasurement;
    1412
     
    1715 */
    1816class SystemOfMeasurementTest {
    19 
    20     /**
    21      * Setup test.
    22      */
    23     @BeforeAll
    24     public static void setUp() {
    25         JOSMFixture.createUnitTestFixture().init();
    26     }
    27 
    2817    /**
    2918     * Test of {@link SystemOfMeasurement#getDistText} method.
  • trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtilTest.java

    r18037 r18853  
    1515import java.util.stream.Collectors;
    1616
     17import org.junit.jupiter.api.Nested;
     18import org.junit.jupiter.api.Test;
    1719import org.openstreetmap.josm.data.osm.Tag;
    1820import org.openstreetmap.josm.data.osm.TagCollection;
     
    2022import org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil.AutomaticChoiceGroup;
    2123import org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil.AutomaticCombine;
    22 import org.openstreetmap.josm.testutils.JOSMTestRules;
    2324import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
    24 
    25 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    26 import org.junit.jupiter.api.Test;
    27 import org.junit.jupiter.api.extension.RegisterExtension;
    2825
    2926/**
     
    10299     * Unit tests of {@link AutomaticCombine} class.
    103100     */
    104     static class AutomaticCombineTest {
     101    @Nested
     102    class AutomaticCombineTest {
    105103
    106104        /**
     
    109107         * @return AutomaticCombine object constructed with the two different constructors.
    110108         */
    111         private static List<AutomaticCombine> differentlyConstructed(AutomaticCombine ac) {
     109        private List<AutomaticCombine> differentlyConstructed(AutomaticCombine ac) {
    112110            AutomaticCombine fullyConstructed = new AutomaticCombine(ac.key, ac.description, ac.isRegex, ac.separator, ac.sort);
    113111            AutomaticCombine defaultConstructed = new AutomaticCombine();
     
    121119
    122120        /**
    123          * Setup test.
    124          */
    125         @RegisterExtension
    126         @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    127         public JOSMTestRules test = new JOSMTestRules();
    128 
    129         /**
    130121         * Unit test of {@link AutomaticCombine#matchesKey} with empty key.
    131122         */
     
    229220     * Unit tests of {@link AutomaticChoice} class.
    230221     */
    231     static class AutomaticChoiceTest {
    232         /**
    233          * Setup test.
    234          */
    235         @RegisterExtension
    236         @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    237         public JOSMTestRules test = new JOSMTestRules();
    238 
    239         /**
    240 
     222    @Nested
     223    class AutomaticChoiceTest {
     224        /**
    241225         * Return AutomaticCombine instantiated with the two possible constructors.
    242226         * @param ac a model for the constructed object.
    243227         * @return AutomaticCombine object constructed with the two different constructors.
    244228         */
    245         private static List<AutomaticChoice> differentlyConstructed(AutomaticChoice ac) {
     229        private List<AutomaticChoice> differentlyConstructed(AutomaticChoice ac) {
    246230            AutomaticChoice fullyConstructed = new AutomaticChoice(ac.key, ac.group, ac.description, ac.isRegex, ac.value, ac.score);
    247231            AutomaticChoice defaultConstructed = new AutomaticChoice();
     
    349333     * Unit tests of {@link AutomaticChoiceGroup} class.
    350334     */
    351     static class AutomaticChoiceGroupTest {
    352         /**
    353          * Setup test.
    354          */
    355         @RegisterExtension
    356         @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    357         public JOSMTestRules test = new JOSMTestRules();
    358 
     335    @Nested
     336    class AutomaticChoiceGroupTest {
    359337        AutomaticChoice choiceKey1Group1 = new AutomaticChoice("Key1", "Group1", "", false, "value1", "score1");
    360338        AutomaticChoice choiceKey1Group1bis = new AutomaticChoice("Key1", "Group1", "", false, "value2", "score2");
  • trunk/test/unit/org/openstreetmap/josm/gui/correction/RoleCorrectionTableTest.java

    r17275 r18853  
    99
    1010import java.util.Arrays;
     11import java.util.Collections;
    1112
    12 import org.junit.jupiter.api.extension.RegisterExtension;
    1313import org.junit.jupiter.api.Test;
    1414import org.openstreetmap.josm.data.correction.RoleCorrection;
     
    1616import org.openstreetmap.josm.data.osm.Relation;
    1717import org.openstreetmap.josm.data.osm.RelationMember;
    18 import org.openstreetmap.josm.testutils.JOSMTestRules;
    19 
    20 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2118
    2219/**
     
    2421 */
    2522class RoleCorrectionTableTest {
    26 
    27     /**
    28      * Setup tests
    29      */
    30     @RegisterExtension
    31     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    32     public JOSMTestRules test = new JOSMTestRules();
    33 
    3423    /**
    3524     * Test of {@link RoleCorrectionTable#RoleCorrectionTable}.
     
    4130        r.addMember(member);
    4231        RoleCorrection rc = new RoleCorrection(r, 0, member, "bar");
    43         RoleCorrectionTable t = new RoleCorrectionTable(Arrays.asList(rc));
     32        RoleCorrectionTable t = new RoleCorrectionTable(Collections.singletonList(rc));
    4433        assertNotNull(t.getCellRenderer(0, 0));
    4534        assertNotNull(t.getCellRenderer(0, 1));
  • trunk/test/unit/org/openstreetmap/josm/gui/correction/TagCorrectionTableTest.java

    r17275 r18853  
    1010import java.util.Arrays;
    1111
    12 import org.junit.jupiter.api.extension.RegisterExtension;
    1312import org.junit.jupiter.api.Test;
    1413import org.openstreetmap.josm.data.correction.TagCorrection;
    15 import org.openstreetmap.josm.testutils.JOSMTestRules;
    16 
    17 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1814
    1915/**
     
    2117 */
    2218class TagCorrectionTableTest {
    23 
    24     /**
    25      * Setup tests
    26      */
    27     @RegisterExtension
    28     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    29     public JOSMTestRules test = new JOSMTestRules();
    30 
    3119    /**
    3220     * Test of {@link TagCorrectionTable#TagCorrectionTable}.
  • trunk/test/unit/org/openstreetmap/josm/gui/dialogs/ChangesetDialogTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.gui.dialogs;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.gui.dialogs.ChangesetDialog.LaunchChangesetManager;
    7 import org.openstreetmap.josm.testutils.JOSMTestRules;
    86
    9 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    107import net.trajano.commons.testing.UtilityClassTestUtil;
    118
     
    1411 */
    1512class ChangesetDialogTest {
    16 
    17     /**
    18      * Setup tests
    19      */
    20     @RegisterExtension
    21     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    22     public JOSMTestRules test = new JOSMTestRules();
    23 
    2413    /**
    2514     * Tests that {@code LaunchChangesetManager} satisfies utility class criteria.
  • trunk/test/unit/org/openstreetmap/josm/gui/dialogs/properties/TaginfoActionTest.java

    r17275 r18853  
    88
    99import org.junit.jupiter.api.Test;
    10 import org.junit.jupiter.api.extension.RegisterExtension;
    1110import org.openstreetmap.josm.data.osm.Tag;
    12 import org.openstreetmap.josm.testutils.JOSMTestRules;
    13 
    14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1511
    1612class TaginfoActionTest {
    17 
    18     /**
    19      * Setup test.
    20      */
    21     @RegisterExtension
    22     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    23     public JOSMTestRules test = new JOSMTestRules();
    24 
    2513    /**
    2614     * Unit test of {@link TaginfoAction#getTaginfoUrlForTag} and {@link TaginfoAction#getTaginfoUrlForRelationType}
  • trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableTest.java

    r17275 r18853  
    88import java.awt.event.MouseListener;
    99
    10 import org.junit.jupiter.api.extension.RegisterExtension;
    1110import org.junit.jupiter.api.Test;
    1211import org.openstreetmap.josm.data.coor.LatLon;
     
    1817import org.openstreetmap.josm.gui.dialogs.relation.SelectionTable.DoubleClickAdapter;
    1918import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    20 import org.openstreetmap.josm.testutils.JOSMTestRules;
    21 
    22 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2319
    2420/**
     
    2622 */
    2723class SelectionTableTest {
    28 
    29     /**
    30      * Setup test.
    31      */
    32     @RegisterExtension
    33     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    34     public JOSMTestRules test = new JOSMTestRules();
    35 
    3624    /**
    3725     * Unit test of {@link SelectionTable#SelectionTable}.
  • trunk/test/unit/org/openstreetmap/josm/gui/download/BookmarkListTest.java

    r17721 r18853  
    22package org.openstreetmap.josm.gui.download;
    33
    4 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
     4import java.time.Instant;
     5
    56import org.junit.jupiter.api.Test;
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    77import org.openstreetmap.josm.data.osm.Changeset;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    9 
    10 import java.time.Instant;
    118
    129/**
     
    1411 */
    1512class BookmarkListTest {
    16 
    17     /**
    18      * Setup test.
    19      */
    20     @RegisterExtension
    21     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    22     public JOSMTestRules test = new JOSMTestRules();
    23 
    2413    /**
    2514     * Unit test of {@link BookmarkList.ChangesetBookmark#ChangesetBookmark(Changeset)}
  • trunk/test/unit/org/openstreetmap/josm/gui/history/HistoryBrowserDialogTest.java

    r17838 r18853  
    66import java.time.Instant;
    77
    8 import org.junit.jupiter.api.extension.RegisterExtension;
    98import org.junit.jupiter.api.Test;
    109import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
     
    1413import org.openstreetmap.josm.data.osm.history.HistoryRelation;
    1514import org.openstreetmap.josm.data.osm.history.HistoryWay;
    16 import org.openstreetmap.josm.testutils.JOSMTestRules;
    17 
    18 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1915
    2016/**
     
    2218 */
    2319class HistoryBrowserDialogTest {
    24 
    25     /**
    26      * Setup test.
    27      */
    28     @RegisterExtension
    29     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    30     public JOSMTestRules test = new JOSMTestRules();
    31 
    3220    /**
    3321     * Test for {@link HistoryBrowserDialog#buildTitle}.
  • trunk/test/unit/org/openstreetmap/josm/gui/io/ActionFlagsTableCellTest.java

    r17275 r18853  
    1010import javax.swing.JTable;
    1111
    12 import org.junit.jupiter.api.extension.RegisterExtension;
    1312import org.junit.jupiter.api.Test;
    1413import org.openstreetmap.josm.data.osm.DataSet;
    1514import org.openstreetmap.josm.gui.layer.AbstractModifiableLayer;
    1615import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    17 import org.openstreetmap.josm.testutils.JOSMTestRules;
    18 
    19 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2016
    2117/**
     
    2319 */
    2420class ActionFlagsTableCellTest {
    25     /**
    26      * Setup test.
    27      */
    28     @RegisterExtension
    29     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    30     public JOSMTestRules test = new JOSMTestRules();
    31 
    3221    /**
    3322     * Test of {@link ActionFlagsTableCell} class.
  • trunk/test/unit/org/openstreetmap/josm/gui/io/SaveLayerInfoTest.java

    r17275 r18853  
    99
    1010import org.junit.jupiter.api.Test;
    11 import org.junit.jupiter.api.extension.RegisterExtension;
    1211import org.openstreetmap.josm.data.osm.DataSet;
    1312import org.openstreetmap.josm.gui.layer.AbstractModifiableLayer;
    1413import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    15 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1614
    1715import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
     
    2119 */
    2220class SaveLayerInfoTest {
    23     /**
    24      * Setup test.
    25      */
    26     @RegisterExtension
    27     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    28     public JOSMTestRules test = new JOSMTestRules();
    29 
    3021    /**
    3122     * Test of {@link SaveLayerInfo} class - null case.
  • trunk/test/unit/org/openstreetmap/josm/gui/io/SaveLayerTaskTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.gui.io;
    33
    4 import static org.junit.jupiter.api.Assertions.assertNotNull;
     4import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
    55import static org.junit.jupiter.api.Assertions.assertThrows;
    66
    77import org.junit.jupiter.api.Test;
    8 import org.junit.jupiter.api.extension.RegisterExtension;
    98import org.openstreetmap.josm.data.osm.DataSet;
    109import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    11 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1210
    1311import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
     
    1715 */
    1816class SaveLayerTaskTest {
    19     /**
    20      * Setup test.
    21      */
    22     @RegisterExtension
    23     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    24     public JOSMTestRules test = new JOSMTestRules();
    25 
    2617    /**
    2718     * Test of {@link SaveLayerTask} class - null case.
     
    3829    @Test
    3930    void testSaveLayerTaskNominal() {
    40         assertNotNull(new SaveLayerTask(new SaveLayerInfo(new OsmDataLayer(new DataSet(), "", null)), null));
     31        assertDoesNotThrow(() -> new SaveLayerTask(new SaveLayerInfo(new OsmDataLayer(new DataSet(), "", null)), null));
    4132    }
    4233}
  • trunk/test/unit/org/openstreetmap/josm/gui/io/UploadAndSaveProgressRendererTest.java

    r17275 r18853  
    99import javax.swing.JPanel;
    1010
    11 import org.junit.jupiter.api.extension.RegisterExtension;
    1211import org.junit.jupiter.api.Test;
    1312import org.openstreetmap.josm.gui.io.SaveLayersModel.Mode;
    14 import org.openstreetmap.josm.testutils.JOSMTestRules;
    15 
    16 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1713
    1814/**
     
    2016 */
    2117class UploadAndSaveProgressRendererTest {
    22 
    23     /**
    24      * Setup tests
    25      */
    26     @RegisterExtension
    27     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    28     public JOSMTestRules test = new JOSMTestRules();
    29 
    3018    /**
    3119     * Unit test of {@link UploadAndSaveProgressRenderer#UploadAndSaveProgressRenderer}.
  • trunk/test/unit/org/openstreetmap/josm/gui/io/UploadPrimitivesTaskTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.gui.io;
    33
    4 import static org.junit.jupiter.api.Assertions.assertNotNull;
     4import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
    55
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    76import org.junit.jupiter.api.Test;
    87import org.openstreetmap.josm.data.osm.Changeset;
     
    109import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    1110import org.openstreetmap.josm.io.UploadStrategySpecification;
    12 import org.openstreetmap.josm.testutils.JOSMTestRules;
    13 
    14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1511
    1612/**
     
    1814 */
    1915class UploadPrimitivesTaskTest {
    20 
    21     /**
    22      * Setup tests
    23      */
    24     @RegisterExtension
    25     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    26     public JOSMTestRules test = new JOSMTestRules();
    27 
    2816    /**
    2917     * Test of {@link UploadPrimitivesTask#UploadPrimitivesTask}.
     
    3119    @Test
    3220    void testUploadPrimitivesTask() {
    33         assertNotNull(new UploadPrimitivesTask(
     21        assertDoesNotThrow(() -> new UploadPrimitivesTask(
    3422                new UploadStrategySpecification(),
    3523                new OsmDataLayer(new DataSet(), null, null),
  • trunk/test/unit/org/openstreetmap/josm/gui/io/UploadedObjectsSummaryPanelTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.gui.io;
    33
    4 import static org.junit.jupiter.api.Assertions.assertNotNull;
     4import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
    55
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    9 
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    117
    128/**
     
    1410 */
    1511class UploadedObjectsSummaryPanelTest {
    16 
    17     /**
    18      * Setup tests
    19      */
    20     @RegisterExtension
    21     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    22     public JOSMTestRules test = new JOSMTestRules();
    23 
    2412    /**
    2513     * Test of {@link UploadedObjectsSummaryPanel#UploadedObjectsSummaryPanel}.
     
    2715    @Test
    2816    void testUploadedObjectsSummaryPanel() {
    29         assertNotNull(new UploadedObjectsSummaryPanel());
     17        assertDoesNotThrow(UploadedObjectsSummaryPanel::new);
    3018    }
    3119}
  • trunk/test/unit/org/openstreetmap/josm/gui/io/importexport/ImageImporterTest.java

    r17548 r18853  
    1111import java.util.List;
    1212
    13 import org.junit.jupiter.api.extension.RegisterExtension;
    1413import org.junit.jupiter.api.Test;
    1514import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
    16 import org.openstreetmap.josm.testutils.JOSMTestRules;
    17 
    18 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1915
    2016/**
     
    2218 */
    2319class ImageImporterTest {
    24 
    25     /**
    26      * Setup test
    27      */
    28     @RegisterExtension
    29     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    30     public JOSMTestRules test = new JOSMTestRules();
    31 
    3220    /**
    3321     * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/14868">Bug #14868</a>.
  • trunk/test/unit/org/openstreetmap/josm/gui/io/importexport/NoteImporterTest.java

    r17275 r18853  
    77import java.io.File;
    88
    9 import org.junit.jupiter.api.extension.RegisterExtension;
    109import org.junit.jupiter.api.Test;
    1110import org.openstreetmap.josm.TestUtils;
    1211import org.openstreetmap.josm.gui.MainApplication;
    13 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1412
    1513/**
     
    1715 */
    1816class NoteImporterTest {
    19 
    20     /**
    21      * Use the test rules to remove any layers and reset state.
    22      */
    23     @RegisterExtension
    24     public final JOSMTestRules rules = new JOSMTestRules();
    25 
    2617    /**
    2718     * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/12531">Bug #12531</a>.
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/AbstractMapViewPaintableTest.java

    r17275 r18853  
    99import org.junit.jupiter.api.BeforeEach;
    1010import org.junit.jupiter.api.Test;
    11 import org.junit.jupiter.api.extension.RegisterExtension;
    1211import org.openstreetmap.josm.gui.layer.MapViewPaintable.PaintableInvalidationListener;
    13 import org.openstreetmap.josm.testutils.JOSMTestRules;
    14 
    15 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1612
    1713/**
     
    2016 */
    2117class AbstractMapViewPaintableTest {
    22     /**
    23      * No special test rules
    24      */
    25     @RegisterExtension
    26     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    27     public JOSMTestRules test = new JOSMTestRules();
    28 
    2918    private Layer testLayer;
    3019
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/MapViewPaintableTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertEquals;
    55
    6 import org.junit.jupiter.api.BeforeAll;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
    97import org.openstreetmap.josm.gui.layer.MapViewPaintable.PaintableInvalidationEvent;
    108
     
    1311 */
    1412class MapViewPaintableTest {
    15 
    16     /**
    17      * Setup tests
    18      */
    19     @BeforeAll
    20     public static void setUpBeforeClass() {
    21         JOSMFixture.createUnitTestFixture().init();
    22     }
    23 
    2413    /**
    2514     * Unit test of {@link MapViewPaintable.PaintableInvalidationEvent#toString}
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/NativeScaleLayerTest.java

    r17275 r18853  
    66import java.util.Collections;
    77
    8 import org.junit.jupiter.api.BeforeAll;
    98import org.junit.jupiter.api.Test;
    10 import org.openstreetmap.josm.JOSMFixture;
    119
    1210/**
     
    1412 */
    1513class NativeScaleLayerTest {
    16 
    17     /**
    18      * Setup tests
    19      */
    20     @BeforeAll
    21     public static void setUpBeforeClass() {
    22         JOSMFixture.createUnitTestFixture().init();
    23     }
    24 
    2514    /**
    2615     * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/12255">#12255</a>.
     
    2817    @Test
    2918    void testTicket12255() {
    30         assertNull(new NativeScaleLayer.ScaleList(Collections.<Double>emptyList()).getSnapScale(10, 2, false));
     19        assertNull(new NativeScaleLayer.ScaleList(Collections.emptyList()).getSnapScale(10, 2, false));
    3120    }
    3221}
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/NoteLayerTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertEquals;
    55
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    9 
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    117
    128/**
     
    1410 */
    1511class NoteLayerTest {
    16 
    17     /**
    18      * Setup tests
    19      */
    20     @RegisterExtension
    21     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    22     public JOSMTestRules test = new JOSMTestRules();
    23 
    2412    /**
    2513     * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/13208">#13208</a>.
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImagesTest.java

    r17715 r18853  
    66import java.util.Collections;
    77
    8 import org.junit.jupiter.api.BeforeAll;
    98import org.junit.jupiter.api.Test;
    10 import org.junit.jupiter.api.extension.RegisterExtension;
    119import org.openstreetmap.josm.data.gpx.GpxData;
    1210import org.openstreetmap.josm.data.gpx.GpxTimeOffset;
    1311import org.openstreetmap.josm.data.gpx.GpxTimezone;
    1412import org.openstreetmap.josm.io.GpxReaderTest;
    15 import org.openstreetmap.josm.testutils.JOSMTestRules;
     13import org.openstreetmap.josm.testutils.annotations.Timezone;
    1614import org.openstreetmap.josm.tools.Pair;
    1715import org.openstreetmap.josm.tools.date.DateUtils;
    18 import org.openstreetmap.josm.tools.date.DateUtilsTest;
    19 
    20 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2116
    2217/**
    2318 * Unit tests of {@link CorrelateGpxWithImages} class.
    2419 */
     20@Timezone
    2521class CorrelateGpxWithImagesTest {
    26 
    27     /**
    28      * Setup test.
    29      */
    30     @RegisterExtension
    31     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    32     public JOSMTestRules test = new JOSMTestRules();
    33 
    34     /**
    35      * Setup test.
    36      */
    37     @BeforeAll
    38     public static void setUp() {
    39         DateUtilsTest.setTimeZone(DateUtils.UTC);
    40     }
    41 
    4222    /**
    4323     * Tests automatic guessing of timezone/offset
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityActionTest.java

    r17275 r18853  
    99import org.junit.jupiter.api.Disabled;
    1010import org.junit.jupiter.api.Test;
    11 import org.junit.jupiter.api.extension.RegisterExtension;
    1211import org.openstreetmap.josm.TestUtils;
    1312import org.openstreetmap.josm.gui.ExtendedDialog;
    1413import org.openstreetmap.josm.gui.layer.GpxLayerTest;
    15 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1614import org.openstreetmap.josm.testutils.mockers.ExtendedDialogMocker;
    17 
    18 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1915
    2016/**
     
    2218 */
    2319class ChooseTrackVisibilityActionTest {
    24 
    25     /**
    26      * Setup test.
    27      */
    28     @RegisterExtension
    29     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    30     public JOSMTestRules test = new JOSMTestRules();
    31 
    3220    /**
    3321     * Test action.
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerActionTest.java

    r18690 r18853  
    1717
    1818import org.junit.jupiter.api.Test;
    19 import org.junit.jupiter.api.extension.RegisterExtension;
    2019import org.openstreetmap.josm.TestUtils;
    2120import org.openstreetmap.josm.data.coor.LatLon;
     
    3029import org.openstreetmap.josm.io.OsmReader;
    3130import org.openstreetmap.josm.spi.preferences.Config;
    32 import org.openstreetmap.josm.testutils.JOSMTestRules;
    3331import org.xml.sax.SAXException;
    34 
    35 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    3632
    3733/**
    3834 * Unit tests of {@link ConvertToDataLayerAction} class.
    3935 */
    40 public class ConvertToDataLayerActionTest {
    41 
    42     /**
    43      * Setup test.
    44      */
    45     @RegisterExtension
    46     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    47     public JOSMTestRules test = new JOSMTestRules();
    48 
     36class ConvertToDataLayerActionTest {
    4937    /**
    5038     * Tests a conversion from a GPX marker layer to a OSM dataset
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/imagery/ColorfulImageProcessorTest.java

    r17983 r18853  
    1212
    1313import org.junit.jupiter.api.Test;
    14 import org.junit.jupiter.api.extension.RegisterExtension;
    15 import org.openstreetmap.josm.testutils.JOSMTestRules;
    16 
    17 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1814
    1915/**
     
    4036
    4137    private static final IndexColorModel COLOR_MODEL = new IndexColorModel(8, PALETTE.length, PALETTE, 0, true, 255, DataBuffer.TYPE_BYTE);
    42 
    43     /**
    44      * No special rules
    45      */
    46     @RegisterExtension
    47     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    48     public JOSMTestRules test = new JOSMTestRules();
    4938
    5039    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/imagery/GammaImageProcessorTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertEquals;
    55
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    9 
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    117
    128/**
     
    1511 */
    1612class GammaImageProcessorTest {
    17 
    18     /**
    19      * No special rules
    20      */
    21     @RegisterExtension
    22     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    23     public JOSMTestRules test = new JOSMTestRules();
    24 
    2513    /**
    2614     * Test {@link GammaImageProcessor#setGamma(double)} and {@link GammaImageProcessor#getGamma()}
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/imagery/SharpenImageProcessorTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertEquals;
    55
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.testutils.JOSMTestRules;
    9 
    10 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    117
    128/**
     
    1511 */
    1612class SharpenImageProcessorTest {
    17 
    18     /**
    19      * No special rules
    20      */
    21     @RegisterExtension
    22     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    23     public JOSMTestRules test = new JOSMTestRules();
    24 
    2513    /**
    2614     * Test {@link SharpenImageProcessor#setSharpenLevel(float)} and {@link SharpenImageProcessor#getSharpenLevel()}
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/markerlayer/AudioMarkerTest.java

    r17275 r18853  
    77import java.net.URL;
    88
    9 import org.junit.jupiter.api.BeforeAll;
    109import org.junit.jupiter.api.Test;
    11 import org.openstreetmap.josm.JOSMFixture;
    1210import org.openstreetmap.josm.data.coor.LatLon;
    1311import org.openstreetmap.josm.data.gpx.GpxData;
     
    1816 */
    1917class AudioMarkerTest {
    20 
    21     /**
    22      * Setup tests
    23      */
    24     @BeforeAll
    25     public static void setUpBeforeClass() {
    26         JOSMFixture.createUnitTestFixture().init();
    27     }
    28 
    2918    /**
    3019     * Unit test of {@link AudioMarker#AudioMarker}.
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarkerTest.java

    r17275 r18853  
    55import static org.junit.jupiter.api.Assertions.assertNotNull;
    66
    7 import org.junit.jupiter.api.BeforeAll;
    87import org.junit.jupiter.api.Test;
    9 import org.openstreetmap.josm.JOSMFixture;
    108import org.openstreetmap.josm.data.coor.LatLon;
    119import org.openstreetmap.josm.data.gpx.WayPoint;
     
    1513 */
    1614class PlayHeadMarkerTest {
    17 
    18     /**
    19      * Setup tests
    20      */
    21     @BeforeAll
    22     public static void setUpBeforeClass() {
    23         JOSMFixture.createUnitTestFixture().init();
    24     }
    25 
    2615    /**
    2716     * Unit test of {@link PlayHeadMarker#PlayHeadMarker}.
  • trunk/test/unit/org/openstreetmap/josm/gui/mappaint/LabelCompositionStrategyTest.java

    r17275 r18853  
    88import java.util.Collections;
    99
    10 import org.junit.jupiter.api.extension.RegisterExtension;
    1110import org.junit.jupiter.api.Test;
    1211import org.openstreetmap.josm.data.osm.Node;
     
    1514import org.openstreetmap.josm.gui.mappaint.styleelement.LabelCompositionStrategy.StaticLabelCompositionStrategy;
    1615import org.openstreetmap.josm.gui.mappaint.styleelement.LabelCompositionStrategy.TagLookupCompositionStrategy;
    17 import org.openstreetmap.josm.testutils.JOSMTestRules;
    18 
    19 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2016
    2117/**
     
    2319 */
    2420class LabelCompositionStrategyTest {
    25 
    26     /**
    27      * Setup rule
    28      */
    29     @RegisterExtension
    30     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    31     public JOSMTestRules test = new JOSMTestRules();
    32 
    3321    /**
    3422     * Test {@link StaticLabelCompositionStrategy}.
  • trunk/test/unit/org/openstreetmap/josm/gui/mappaint/MapCSSWithExtendedTextDirectivesTest.java

    r18690 r18853  
    99import java.awt.Color;
    1010
    11 import org.junit.jupiter.api.extension.RegisterExtension;
    1211import org.junit.jupiter.api.Test;
    1312import org.openstreetmap.josm.data.osm.Node;
     
    1615import org.openstreetmap.josm.gui.mappaint.styleelement.LabelCompositionStrategy.TagLookupCompositionStrategy;
    1716import org.openstreetmap.josm.gui.mappaint.styleelement.TextLabel;
    18 import org.openstreetmap.josm.testutils.JOSMTestRules;
    19 
    20 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2117
    2218/**
     
    2420 */
    2521class MapCSSWithExtendedTextDirectivesTest {
    26 
    27     /**
    28      * Setup rule
    29      */
    30     @RegisterExtension
    31     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    32     public JOSMTestRules test = new JOSMTestRules();
    33 
    3422    /**
    3523     * Test {@link DeriveLabelFromNameTagsCompositionStrategy}
  • trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactoryTest.java

    r17758 r18853  
    22package org.openstreetmap.josm.gui.mappaint.mapcss;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    5 import org.junit.jupiter.api.Test;
    6 import org.openstreetmap.josm.testutils.JOSMTestRules;
    7 
    8 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    9 import net.trajano.commons.testing.UtilityClassTestUtil;
    10 
    114import java.lang.reflect.Method;
    125import java.lang.reflect.Modifier;
     6
     7import org.junit.jupiter.api.Test;
     8
     9import net.trajano.commons.testing.UtilityClassTestUtil;
    1310
    1411/**
     
    1613 */
    1714class ExpressionFactoryTest {
    18 
    19     /**
    20      * Setup rule
    21      */
    22     @RegisterExtension
    23     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    24     public JOSMTestRules test = new JOSMTestRules();
    25 
    2615    /**
    2716     * Tests that {@code Functions} satisfies utility class criteria.
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreferenceTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertNotNull;
    55
    6 import org.junit.jupiter.api.BeforeAll;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
    97import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
    108
     
    1311 */
    1412class AdvancedPreferenceTest {
    15 
    16     /**
    17      * Setup test.
    18      */
    19     @BeforeAll
    20     public static void setUpBeforeClass() {
    21         JOSMFixture.createUnitTestFixture().init();
    22     }
    23 
    2413    /**
    2514     * Unit test of {@link AdvancedPreference#AdvancedPreference}.
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/ListEditorTest.java

    r17275 r18853  
    66import static org.junit.jupiter.api.Assertions.assertTrue;
    77
    8 import java.util.Arrays;
     8import java.util.Collections;
    99
    10 import org.junit.jupiter.api.BeforeAll;
    1110import org.junit.jupiter.api.Test;
    12 import org.openstreetmap.josm.JOSMFixture;
    1311import org.openstreetmap.josm.gui.preferences.advanced.ListEditor.ListSettingTableModel;
    1412
     
    1715 */
    1816class ListEditorTest {
    19 
    20     /**
    21      * Setup test.
    22      */
    23     @BeforeAll
    24     public static void setUpBeforeClass() {
    25         JOSMFixture.createUnitTestFixture().init();
    26     }
    27 
    2817    /**
    2918     * Unit test of {@link ListSettingTableModel} class.
     
    3322        ListSettingTableModel model = new ListSettingTableModel(null);
    3423        assertNotNull(model.getData());
    35         model = new ListSettingTableModel(Arrays.asList("foo"));
     24        model = new ListSettingTableModel(Collections.singletonList("foo"));
    3625        assertTrue(model.getData().contains("foo"));
    3726        assertEquals(2, model.getRowCount());
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/advanced/PrefEntryTest.java

    r17275 r18853  
    66import static org.junit.jupiter.api.Assertions.assertTrue;
    77
    8 import org.junit.jupiter.api.BeforeAll;
    98import org.junit.jupiter.api.Test;
    10 import org.openstreetmap.josm.JOSMFixture;
    119import org.openstreetmap.josm.TestUtils;
    1210import org.openstreetmap.josm.spi.preferences.StringSetting;
     
    1816 */
    1917class PrefEntryTest {
    20 
    21     /**
    22      * Setup test.
    23      */
    24     @BeforeAll
    25     public static void setUpBeforeClass() {
    26         JOSMFixture.createUnitTestFixture().init();
    27     }
    28 
    2918    /**
    3019     * Unit test of {@link PrefEntry#PrefEntry}.
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/audio/AudioPreferenceTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertNotNull;
    55
    6 import org.junit.jupiter.api.BeforeAll;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
    97import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
    108import org.openstreetmap.josm.spi.preferences.Config;
     
    1412 */
    1513class AudioPreferenceTest {
    16 
    17     /**
    18      * Setup test.
    19      */
    20     @BeforeAll
    21     public static void setUpBeforeClass() {
    22         JOSMFixture.createUnitTestFixture().init();
    23     }
    24 
    2514    /**
    2615     * Unit test of {@link AudioPreference#AudioPreference}.
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/ColorPreferenceTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertNotNull;
    55
    6 import org.junit.jupiter.api.BeforeAll;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
    97import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
    108
     
    1311 */
    1412class ColorPreferenceTest {
    15 
    16     /**
    17      * Setup test.
    18      */
    19     @BeforeAll
    20     public static void setUpBeforeClass() {
    21         JOSMFixture.createUnitTestFixture().init();
    22     }
    23 
    2413    /**
    2514     * Unit test of {@link ColorPreference#ColorPreference}.
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/DisplayPreferenceTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertNotNull;
    55
    6 import org.junit.jupiter.api.BeforeAll;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
    97import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
    108
     
    1311 */
    1412class DisplayPreferenceTest {
    15 
    16     /**
    17      * Setup test.
    18      */
    19     @BeforeAll
    20     public static void setUpBeforeClass() {
    21         JOSMFixture.createUnitTestFixture().init();
    22     }
    23 
    2413    /**
    2514     * Unit test of {@link DisplayPreference#DisplayPreference}.
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/DrawingPreferenceTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertNotNull;
    55
    6 import org.junit.jupiter.api.BeforeAll;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
    97import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
    108
     
    1311 */
    1412class DrawingPreferenceTest {
    15 
    16     /**
    17      * Setup test.
    18      */
    19     @BeforeAll
    20     public static void setUpBeforeClass() {
    21         JOSMFixture.createUnitTestFixture().init();
    22     }
    23 
    2413    /**
    2514     * Unit test of {@link DrawingPreference#DrawingPreference}.
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/GPXPreferenceTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertNotNull;
    55
    6 import org.junit.jupiter.api.BeforeAll;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
    97import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
    108
     
    1311 */
    1412class GPXPreferenceTest {
    15 
    16     /**
    17      * Setup test.
    18      */
    19     @BeforeAll
    20     public static void setUpBeforeClass() {
    21         JOSMFixture.createUnitTestFixture().init();
    22     }
    23 
    2413    /**
    2514     * Unit test of {@link GPXPreference.Factory}.
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/LafPreferenceTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertNotNull;
    55
    6 import org.junit.jupiter.api.BeforeAll;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
    97import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
    108
     
    1311 */
    1412class LafPreferenceTest {
    15 
    16     /**
    17      * Setup test.
    18      */
    19     @BeforeAll
    20     public static void setUpBeforeClass() {
    21         JOSMFixture.createUnitTestFixture().init();
    22     }
    23 
    2413    /**
    2514     * Unit test of {@link LafPreference#LafPreference}.
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/display/LanguagePreferenceTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertNotNull;
    55
    6 import org.junit.jupiter.api.BeforeAll;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
    97import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
    108
     
    1311 */
    1412class LanguagePreferenceTest {
    15 
    16     /**
    17      * Setup test.
    18      */
    19     @BeforeAll
    20     public static void setUpBeforeClass() {
    21         JOSMFixture.createUnitTestFixture().init();
    22     }
    23 
    2413    /**
    2514     * Unit test of {@link LanguagePreference#LanguagePreference}.
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/BackupPreferenceTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertNotNull;
    55
    6 import org.junit.jupiter.api.BeforeAll;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
    97import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
    108
     
    1311 */
    1412class BackupPreferenceTest {
    15 
    16     /**
    17      * Setup test.
    18      */
    19     @BeforeAll
    20     public static void setUpBeforeClass() {
    21         JOSMFixture.createUnitTestFixture().init();
    22     }
    23 
    2413    /**
    2514     * Unit test of {@link BackupPreference#BackupPreference}.
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertNotNull;
    55
    6 import org.junit.jupiter.api.BeforeAll;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
    97import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
    108
     
    1311 */
    1412class MapPaintPreferenceTest {
    15 
    16     /**
    17      * Setup test.
    18      */
    19     @BeforeAll
    20     public static void setUpBeforeClass() {
    21         JOSMFixture.createUnitTestFixture().init();
    22     }
    23 
    2413    /**
    2514     * Unit test of {@link MapPaintPreference#MapPaintPreference}.
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertNotNull;
    55
    6 import org.junit.jupiter.api.BeforeAll;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
    97import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
    108
     
    1311 */
    1412class TaggingPresetPreferenceTest {
    15 
    16     /**
    17      * Setup test.
    18      */
    19     @BeforeAll
    20     public static void setUpBeforeClass() {
    21         JOSMFixture.createUnitTestFixture().init();
    22     }
    2313
    2414    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/projection/ProjectionPreferenceTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertNotNull;
    55
    6 import org.junit.jupiter.api.BeforeAll;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
    97import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
    108
     
    1311 */
    1412class ProjectionPreferenceTest {
    15 
    16     /**
    17      * Setup test.
    18      */
    19     @BeforeAll
    20     public static void setUpBeforeClass() {
    21         JOSMFixture.createUnitTestFixture().init();
    22     }
    23 
    2413    /**
    2514     * Unit test of {@link ProjectionPreference#ProjectionPreference}.
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/remotecontrol/RemoteControlPreferenceTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertNotNull;
    55
    6 import org.junit.jupiter.api.BeforeAll;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
    97import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
    108
     
    1311 */
    1412class RemoteControlPreferenceTest {
    15 
    16     /**
    17      * Setup test.
    18      */
    19     @BeforeAll
    20     public static void setUpBeforeClass() {
    21         JOSMFixture.createUnitTestFixture().init();
    22     }
    23 
    2413    /**
    2514     * Unit test of {@link RemoteControlPreference#RemoteControlPreference}.
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/shortcut/ShortcutPreferenceTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertNotNull;
    55
    6 import org.junit.jupiter.api.BeforeAll;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
    97import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
    108
     
    1311 */
    1412class ShortcutPreferenceTest {
    15 
    16     /**
    17      * Setup test.
    18      */
    19     @BeforeAll
    20     public static void setUpBeforeClass() {
    21         JOSMFixture.createUnitTestFixture().init();
    22     }
    23 
    2413    /**
    2514     * Unit test of {@link ShortcutPreference#ShortcutPreference}.
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorPreferenceTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertNotNull;
    55
    6 import org.junit.jupiter.api.BeforeAll;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
    97import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
    108
     
    1311 */
    1412class ValidatorPreferenceTest {
    15 
    16     /**
    17      * Setup test.
    18      */
    19     @BeforeAll
    20     public static void setUpBeforeClass() {
    21         JOSMFixture.createUnitTestFixture().init();
    22     }
    23 
    2413    /**
    2514     * Unit test of {@link ValidatorPreference#ValidatorPreference}.
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTestsPreferenceTest.java

    r17275 r18853  
    44import static org.junit.jupiter.api.Assertions.assertNotNull;
    55
    6 import org.junit.jupiter.api.BeforeAll;
    76import org.junit.jupiter.api.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
    97import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils;
    108
     
    1311 */
    1412class ValidatorTestsPreferenceTest {
    15 
    16     /**
    17      * Setup test.
    18      */
    19     @BeforeAll
    20     public static void setUpBeforeClass() {
    21         JOSMFixture.createUnitTestFixture().init();
    22     }
    23 
    2413    /**
    2514     * Unit test of {@link ValidatorTestsPreference#ValidatorTestsPreference}.
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManagerTest.java

    r17275 r18853  
    22package org.openstreetmap.josm.gui.tagging.ac;
    33
    4 import org.junit.jupiter.api.extension.RegisterExtension;
    54import org.junit.jupiter.api.Test;
    65import org.openstreetmap.josm.TestUtils;
     
    98import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    109import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionManager.UserInputTag;
    11 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1210
    13 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1411import nl.jqno.equalsverifier.EqualsVerifier;
    1512
     
    1815 */
    1916class AutoCompletionManagerTest {
    20 
    21     /**
    22      * Setup rule
    23      */
    24     @RegisterExtension
    25     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    26     public JOSMTestRules test = new JOSMTestRules();
    27 
    2817    /**
    2918     * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/17064">#17064</a>.
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/PresetClassificationsTest.java

    r17275 r18853  
    1414import org.junit.jupiter.api.BeforeAll;
    1515import org.junit.jupiter.api.Test;
    16 import org.openstreetmap.josm.JOSMFixture;
    1716import org.openstreetmap.josm.data.osm.Node;
    1817import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    3736    @BeforeAll
    3837    public static void setUp() throws IOException, SAXException {
    39         JOSMFixture.createUnitTestFixture().init();
    4038        final Collection<TaggingPreset> presets = TaggingPresetReader.readAll("resource://data/defaultpresets.xml", true);
    4139        classifications.loadPresets(presets);
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetItemGuiSupportTest.java

    r17876 r18853  
    22package org.openstreetmap.josm.gui.tagging.presets;
    33
    4 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    5 import org.junit.jupiter.api.Test;
    6 import org.junit.jupiter.api.extension.RegisterExtension;
    7 import org.openstreetmap.josm.data.osm.OsmPrimitive;
    8 import org.openstreetmap.josm.data.osm.OsmUtils;
    9 import org.openstreetmap.josm.data.osm.Tag;
    10 import org.openstreetmap.josm.testutils.JOSMTestRules;
    11 import org.openstreetmap.josm.tools.template_engine.TemplateEntry;
    12 import org.openstreetmap.josm.tools.template_engine.TemplateParser;
     4import static org.junit.jupiter.api.Assertions.assertEquals;
    135
    146import java.util.ArrayList;
     
    179import java.util.Collections;
    1810
    19 import static org.junit.jupiter.api.Assertions.assertEquals;
     11import org.junit.jupiter.api.Test;
     12import org.openstreetmap.josm.data.osm.OsmPrimitive;
     13import org.openstreetmap.josm.data.osm.OsmUtils;
     14import org.openstreetmap.josm.data.osm.Tag;
     15import org.openstreetmap.josm.tools.template_engine.TemplateEntry;
     16import org.openstreetmap.josm.tools.template_engine.TemplateParser;
    2017
    2118/**
     
    2320 */
    2421class TaggingPresetItemGuiSupportTest {
    25 
    26     /**
    27      * Setup rule
    28      */
    29     @RegisterExtension
    30     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    31     public JOSMTestRules test = new JOSMTestRules();
    32 
    3322    /**
    3423     * Tests {@link TemplateEntry} evaluation
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReaderTest.java

    r18690 r18853  
    1515
    1616import org.junit.jupiter.api.Test;
    17 import org.junit.jupiter.api.extension.RegisterExtension;
    1817import org.openstreetmap.josm.TestUtils;
    1918import org.openstreetmap.josm.gui.tagging.presets.items.Check;
    2019import org.openstreetmap.josm.gui.tagging.presets.items.Key;
    21 import org.openstreetmap.josm.testutils.JOSMTestRules;
    2220import org.xml.sax.SAXException;
    23 
    24 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2521
    2622/**
     
    2824 */
    2925class TaggingPresetReaderTest {
    30 
    31     /**
    32      * Setup rule
    33      */
    34     @RegisterExtension
    35     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    36     public JOSMTestRules test = new JOSMTestRules();
    37 
    3826    /**
    3927     * #8954 - last checkbox in the preset is not added
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetTest.java

    r18037 r18853  
    88
    99import org.junit.jupiter.api.Test;
    10 import org.junit.jupiter.api.extension.RegisterExtension;
    1110import org.openstreetmap.josm.data.osm.IPrimitive;
    1211import org.openstreetmap.josm.data.osm.OsmUtils;
     
    1413import org.openstreetmap.josm.data.osm.search.SearchParseError;
    1514import org.openstreetmap.josm.gui.tagging.presets.items.Key;
    16 import org.openstreetmap.josm.testutils.JOSMTestRules;
    17 
    18 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1915
    2016/**
     
    2218 */
    2319class TaggingPresetTest {
    24 
    25     /**
    26      * Setup test.
    27      */
    28     @RegisterExtension
    29     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    30     public JOSMTestRules test = new JOSMTestRules();
    31 
    3220    /**
    3321     * Tests {@link TaggingPreset#test(IPrimitive)}
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/CheckGroupTest.java

    r17609 r18853  
    88import javax.swing.JPanel;
    99
    10 import org.junit.jupiter.api.BeforeAll;
    1110import org.junit.jupiter.api.Test;
    12 import org.openstreetmap.josm.JOSMFixture;
    1311import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetItemGuiSupport;
    1412
     
    1715 */
    1816class CheckGroupTest {
    19 
    20     /**
    21      * Setup test.
    22      */
    23     @BeforeAll
    24     public static void setUp() {
    25         JOSMFixture.createUnitTestFixture().init();
    26     }
    27 
    2817    /**
    2918     * Unit test for {@link CheckGroup#addToPanel}.
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/ItemSeparatorTest.java

    r17609 r18853  
    88import javax.swing.JPanel;
    99
    10 import org.junit.jupiter.api.BeforeAll;
    1110import org.junit.jupiter.api.Test;
    12 import org.openstreetmap.josm.JOSMFixture;
    1311import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetItemGuiSupport;
    1412
     
    1715 */
    1816class ItemSeparatorTest {
    19 
    20     /**
    21      * Setup test.
    22      */
    23     @BeforeAll
    24     public static void setUp() {
    25         JOSMFixture.createUnitTestFixture().init();
    26     }
    27 
    2817    /**
    2918     * Unit test for {@link ItemSeparator#addToPanel}.
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/KeyTest.java

    r17609 r18853  
    77import javax.swing.JPanel;
    88
    9 import org.junit.jupiter.api.BeforeAll;
    109import org.junit.jupiter.api.Test;
    11 import org.openstreetmap.josm.JOSMFixture;
    1210import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetItemGuiSupport;
    1311
     
    1614 */
    1715class KeyTest {
    18 
    19     /**
    20      * Setup test.
    21      */
    22     @BeforeAll
    23     public static void setUp() {
    24         JOSMFixture.createUnitTestFixture().init();
    25     }
    26 
    2716    /**
    2817     * Unit test for {@link Key#addToPanel}.
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/LabelTest.java

    r17609 r18853  
    77import javax.swing.JPanel;
    88
    9 import org.junit.jupiter.api.BeforeAll;
    109import org.junit.jupiter.api.Test;
    11 import org.openstreetmap.josm.JOSMFixture;
    1210import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetItemGuiSupport;
    1311
     
    1614 */
    1715class LabelTest {
    18 
    19     /**
    20      * Setup test.
    21      */
    22     @BeforeAll
    23     public static void setUp() {
    24         JOSMFixture.createUnitTestFixture().init();
    25     }
    26 
    2716    /**
    2817     * Unit test for {@link Label#addToPanel}.
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/LinkTest.java

    r17609 r18853  
    88import javax.swing.JPanel;
    99
    10 import org.junit.jupiter.api.BeforeAll;
    1110import org.junit.jupiter.api.Test;
    12 import org.openstreetmap.josm.JOSMFixture;
    1311import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetItemGuiSupport;
    1412import org.openstreetmap.josm.spi.preferences.Config;
     
    1816 */
    1917class LinkTest {
    20 
    21     /**
    22      * Setup test.
    23      */
    24     @BeforeAll
    25     public static void setUp() {
    26         JOSMFixture.createUnitTestFixture().init();
    27     }
    28 
    2918    /**
    3019     * Unit test for {@link Link#addToPanel}.
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/MultiSelectTest.java

    r17609 r18853  
    77import javax.swing.JPanel;
    88
    9 import org.junit.jupiter.api.BeforeAll;
    109import org.junit.jupiter.api.Test;
    11 import org.openstreetmap.josm.JOSMFixture;
    1210import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetItemGuiSupport;
    1311
     
    1614 */
    1715class MultiSelectTest {
    18 
    19     /**
    20      * Setup test.
    21      */
    22     @BeforeAll
    23     public static void setUp() {
    24         JOSMFixture.createUnitTestFixture().init();
    25     }
    26 
    2716    /**
    2817     * Unit test for {@link MultiSelect#addToPanel}.
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/OptionalTest.java

    r17609 r18853  
    88import javax.swing.JPanel;
    99
    10 import org.junit.jupiter.api.BeforeAll;
    1110import org.junit.jupiter.api.Test;
    12 import org.openstreetmap.josm.JOSMFixture;
    1311import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetItemGuiSupport;
    1412
     
    1715 */
    1816class OptionalTest {
    19 
    20     /**
    21      * Setup test.
    22      */
    23     @BeforeAll
    24     public static void setUp() {
    25         JOSMFixture.createUnitTestFixture().init();
    26     }
    27 
    2817    /**
    2918     * Unit test for {@link Optional#addToPanel}.
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/PresetListEntryTest.java

    r18327 r18853  
    55import static org.junit.jupiter.api.Assertions.assertTrue;
    66
    7 import org.junit.jupiter.api.BeforeAll;
    87import org.junit.jupiter.api.Test;
    9 import org.openstreetmap.josm.JOSMFixture;
    108
    119/**
     
    1311 */
    1412class PresetListEntryTest {
    15 
    16     /**
    17      * Setup test.
    18      */
    19     @BeforeAll
    20     public static void setUp() {
    21         JOSMFixture.createUnitTestFixture().init();
    22     }
    23 
    2413    /**
    2514     * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/12416">#12416</a>.
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/RolesTest.java

    r17609 r18853  
    88import javax.swing.JPanel;
    99
    10 import org.junit.jupiter.api.BeforeAll;
    1110import org.junit.jupiter.api.Test;
    12 import org.openstreetmap.josm.JOSMFixture;
    1311import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetItemGuiSupport;
    1412
     
    1715 */
    1816class RolesTest {
    19 
    20     /**
    21      * Setup test.
    22      */
    23     @BeforeAll
    24     public static void setUp() {
    25         JOSMFixture.createUnitTestFixture().init();
    26     }
    27 
    2817    /**
    2918     * Unit test for {@link Roles#addToPanel}.
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/SpaceTest.java

    r17609 r18853  
    88import javax.swing.JPanel;
    99
    10 import org.junit.jupiter.api.BeforeAll;
    1110import org.junit.jupiter.api.Test;
    12 import org.openstreetmap.josm.JOSMFixture;
    1311import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetItemGuiSupport;
    1412
     
    1715 */
    1816class SpaceTest {
    19 
    20     /**
    21      * Setup test.
    22      */
    23     @BeforeAll
    24     public static void setUp() {
    25         JOSMFixture.createUnitTestFixture().init();
    26     }
    27 
    2817    /**
    2918     * Unit test for {@link Space#addToPanel}.
  • trunk/test/unit/org/openstreetmap/josm/gui/util/MultiLineFlowLayoutTest.java

    r17275 r18853  
    1212import org.junit.jupiter.api.BeforeEach;
    1313import org.junit.jupiter.api.Test;
    14 import org.junit.jupiter.api.extension.RegisterExtension;
    15 import org.openstreetmap.josm.testutils.JOSMTestRules;
    16 
    17 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1814
    1915/**
     
    2218 */
    2319class MultiLineFlowLayoutTest {
    24     /**
    25      * No special rules.
    26      */
    27     @RegisterExtension
    28     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    29     public JOSMTestRules test = new JOSMTestRules();
    30 
    3120    private static final int TEST_WIDHT = 500;
    3221    private JPanel container;
  • trunk/test/unit/org/openstreetmap/josm/gui/widgets/AutoAdjustingSplitPaneTest.java

    r17275 r18853  
    88import javax.swing.JSplitPane;
    99
    10 import org.junit.jupiter.api.extension.RegisterExtension;
    1110import org.junit.jupiter.api.Test;
    12 import org.openstreetmap.josm.testutils.JOSMTestRules;
    13 
    14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1511
    1612/**
     
    1814 */
    1915class AutoAdjustingSplitPaneTest {
    20 
    21     /**
    22      * Setup test.
    23      */
    24     @RegisterExtension
    25     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    26     public JOSMTestRules test = new JOSMTestRules();
    27 
    2816    /**
    2917     * Unit test of {@link AutoAdjustingSplitPane} class.
  • trunk/test/unit/org/openstreetmap/josm/io/OsmApiTest.java

    r17275 r18853  
    77import java.nio.charset.StandardCharsets;
    88
    9 import org.junit.jupiter.api.BeforeAll;
    109import org.junit.jupiter.api.Test;
    11 import org.openstreetmap.josm.JOSMFixture;
    1210import org.openstreetmap.josm.data.osm.Changeset;
    1311import org.openstreetmap.josm.data.osm.User;
     
    1816 */
    1917class OsmApiTest {
    20 
    21     /**
    22      * Setup test.
    23      */
    24     @BeforeAll
    25     public static void setUp() {
    26         JOSMFixture.createUnitTestFixture().init();
    27     }
    28 
    2918    /**
    3019     * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/12675">Bug #12675</a>.
  • trunk/test/unit/org/openstreetmap/josm/io/audio/AudioPlayerTest.java

    r17275 r18853  
    33
    44import static org.junit.jupiter.api.Assertions.assertFalse;
     5import static org.junit.jupiter.api.Assertions.assertTimeout;
    56import static org.junit.jupiter.api.Assertions.assertTrue;
    6 import static org.junit.jupiter.api.Assertions.assertTimeout;
    77
    88import java.io.File;
    9 import java.net.MalformedURLException;
    109import java.net.URL;
    1110import java.time.Duration;
    1211
    13 import org.junit.jupiter.api.BeforeAll;
    1412import org.junit.jupiter.api.Disabled;
    1513import org.junit.jupiter.api.Test;
    16 import org.openstreetmap.josm.JOSMFixture;
    1714import org.openstreetmap.josm.TestUtils;
    1815import org.openstreetmap.josm.tools.Stopwatch;
     
    2825
    2926    /**
    30      * Setup test.
    31      */
    32     @BeforeAll
    33     public static void setUp() {
    34         JOSMFixture.createUnitTestFixture().init();
    35     }
    36 
    37     /**
    3827     * Test method for {@code AudioPlayer#play(URL)}
    39      * @throws Exception audio fault exception, e.g. can't open stream, unhandleable audio format
    40      * @throws MalformedURLException wrong URL
    4128     */
    4229    @Test
    43     void testPlay() throws MalformedURLException, Exception {
     30    void testPlay() {
    4431        assertTimeout(Duration.ofMillis(4*MAX_DURATION), () -> {
    4532            File wav1 = new File(TestUtils.getRegressionDataFile(6851, "20111003_121226.wav"));
  • trunk/test/unit/org/openstreetmap/josm/io/audio/AudioUtilTest.java

    r17275 r18853  
    66import java.io.File;
    77
    8 import org.junit.jupiter.api.BeforeAll;
    98import org.junit.jupiter.api.Test;
    10 import org.openstreetmap.josm.JOSMFixture;
    119import org.openstreetmap.josm.TestUtils;
    1210
     
    1715
    1816    private static final double EPSILON = 1e-11;
    19 
    20     /**
    21      * Setup test.
    22      */
    23     @BeforeAll
    24     public static void setUp() {
    25         JOSMFixture.createUnitTestFixture().init();
    26     }
    2717
    2818    /**
  • trunk/test/unit/org/openstreetmap/josm/io/nmea/NmeaReaderTest.java

    r18788 r18853  
    1818
    1919import org.junit.jupiter.api.Test;
    20 import org.junit.jupiter.api.extension.RegisterExtension;
    2120import org.openstreetmap.josm.TestUtils;
    2221import org.openstreetmap.josm.data.coor.LatLon;
     
    2726import org.openstreetmap.josm.data.gpx.WayPoint;
    2827import org.openstreetmap.josm.io.GpxReaderTest;
    29 import org.openstreetmap.josm.testutils.JOSMTestRules;
    3028import org.openstreetmap.josm.tools.date.DateUtils;
    3129import org.xml.sax.SAXException;
    32 
    33 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    3430
    3531/**
     
    3733 */
    3834class NmeaReaderTest {
    39     /**
    40      * Set the timezone and timeout.
    41      */
    42     @RegisterExtension
    43     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    44     public JOSMTestRules test = new JOSMTestRules();
    45 
    4635    /**
    4736     * Tests reading a nmea file.
  • trunk/test/unit/org/openstreetmap/josm/io/protocols/data/HandlerTest.java

    r17275 r18853  
    1010import org.junit.jupiter.api.BeforeEach;
    1111import org.junit.jupiter.api.Test;
    12 import org.junit.jupiter.api.extension.RegisterExtension;
    13 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1412
    1513/**
     
    1715 */
    1816class HandlerTest {
    19 
    20     /**
    21      * Use the test rules to remove any layers and reset state.
    22      */
    23     @RegisterExtension
    24     public final JOSMTestRules rules = new JOSMTestRules();
    25 
    2617    /**
    2718     * Setup test.
  • trunk/test/unit/org/openstreetmap/josm/io/rtklib/RtkLibPosReaderTest.java

    r18048 r18853  
    1313
    1414import org.junit.jupiter.api.Test;
    15 import org.junit.jupiter.api.extension.RegisterExtension;
    1615import org.openstreetmap.josm.data.coor.LatLon;
    1716import org.openstreetmap.josm.data.gpx.GpxConstants;
    1817import org.openstreetmap.josm.data.gpx.WayPoint;
    19 import org.openstreetmap.josm.testutils.JOSMTestRules;
    2018import org.openstreetmap.josm.tools.date.DateUtils;
    2119import org.xml.sax.SAXException;
    22 
    23 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2420
    2521/**
     
    2723 */
    2824class RtkLibPosReaderTest {
    29     /**
    30      * Set the timezone and timeout.
    31      */
    32     @RegisterExtension
    33     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    34     public JOSMTestRules test = new JOSMTestRules();
    35 
    3625    private static RtkLibPosReader read(String path) throws IOException, SAXException {
    3726        TimeZone.setDefault(TimeZone.getTimeZone("Europe/Berlin"));
  • trunk/test/unit/org/openstreetmap/josm/testutils/annotations/JosmDefaults.java

    r18694 r18853  
    7777        /**
    7878         * Clean up what test not using these test rules may have broken.
     79         * See {@link org.openstreetmap.josm.JOSMFixture} for the most common reason why this needs to be called.
    7980         */
    80         private void cleanUpFromJosmFixture() {
     81        private static void cleanUpFromJosmFixture() {
    8182            MemoryManagerTest.resetState(true);
    8283            JOSMTestRules.cleanLayerEnvironment();
  • trunk/test/unit/org/openstreetmap/josm/tools/ExifReaderTest.java

    r17715 r18853  
    1212import org.junit.jupiter.api.BeforeEach;
    1313import org.junit.jupiter.api.Test;
    14 import org.junit.jupiter.api.extension.RegisterExtension;
    1514import org.openstreetmap.josm.TestUtils;
    1615import org.openstreetmap.josm.data.coor.LatLon;
    1716import org.openstreetmap.josm.data.coor.conversion.AbstractCoordinateFormat;
    1817import org.openstreetmap.josm.data.coor.conversion.DMSCoordinateFormat;
    19 import org.openstreetmap.josm.testutils.JOSMTestRules;
    20 
    21 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2218
    2319/**
     
    2622 */
    2723class ExifReaderTest {
    28     /**
    29      * Set the timezone and timeout.
    30      */
    31     @RegisterExtension
    32     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    33     public JOSMTestRules test = new JOSMTestRules();
    34 
    3524    private File orientationSampleFile, directionSampleFile;
    3625
  • trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookOsxTest.java

    r17679 r18853  
    1313import org.junit.jupiter.api.BeforeAll;
    1414import org.junit.jupiter.api.Test;
    15 import org.openstreetmap.josm.JOSMFixture;
    1615import org.openstreetmap.josm.spi.preferences.Config;
    1716
     
    2827    @BeforeAll
    2928    public static void setUp() {
    30         JOSMFixture.createUnitTestFixture().init();
    3129        hook = new PlatformHookOsx();
    3230    }
  • trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookTestIT.java

    r18723 r18853  
    88import java.net.URL;
    99
     10import org.junit.jupiter.api.Test;
     11
    1012import jakarta.json.Json;
    11 
    12 import org.junit.jupiter.api.Test;
    13 import org.junit.jupiter.api.extension.RegisterExtension;
    14 import org.openstreetmap.josm.testutils.JOSMTestRules;
    15 
    16 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1713
    1814/**
     
    2016 */
    2117class PlatformHookTestIT {
    22 
    23     /**
    24      * Setup rule
    25      */
    26     @RegisterExtension
    27     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    28     public JOSMTestRules test = new JOSMTestRules();
    29 
    3018    /**
    3119     * Test that we always support the latest Ubuntu version.
  • trunk/test/unit/org/openstreetmap/josm/tools/ShortcutTest.java

    r17275 r18853  
    99import javax.swing.KeyStroke;
    1010
    11 import org.junit.jupiter.api.BeforeAll;
    1211import org.junit.jupiter.api.Test;
    13 import org.openstreetmap.josm.JOSMFixture;
    1412
    1513/**
     
    1715 */
    1816class ShortcutTest {
    19 
    20     /**
    21      * Setup test.
    22      */
    23     @BeforeAll
    24     public static void setUp() {
    25         JOSMFixture.createUnitTestFixture().init();
    26     }
    27 
    2817    /**
    2918     * Test method for {@code Shortcut#makeTooltip}
  • trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateEntryTest.java

    r18690 r18853  
    66import java.util.Set;
    77
    8 import org.junit.jupiter.api.extension.RegisterExtension;
    98import org.junit.jupiter.api.Test;
    109import org.openstreetmap.josm.TestUtils;
    11 import org.openstreetmap.josm.testutils.JOSMTestRules;
    1210import org.openstreetmap.josm.tools.Logging;
    1311
    14 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1512import nl.jqno.equalsverifier.EqualsVerifier;
    1613import nl.jqno.equalsverifier.Warning;
     
    2017 */
    2118class TemplateEntryTest {
    22 
    23     /**
    24      * Setup rule.
    25      */
    26     @RegisterExtension
    27     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    28     public JOSMTestRules test = new JOSMTestRules();
    29 
    3019    /**
    3120     * Unit test of methods {@link TemplateEntry#equals} and {@link TemplateEntry#hashCode}, including all subclasses.
  • trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateParserTest.java

    r18690 r18853  
    88import java.util.List;
    99
    10 import org.junit.jupiter.api.BeforeAll;
    1110import org.junit.jupiter.api.Test;
    12 import org.openstreetmap.josm.JOSMFixture;
    1311import org.openstreetmap.josm.data.osm.Node;
    1412import org.openstreetmap.josm.data.osm.Relation;
     
    2321 */
    2422class TemplateParserTest {
    25 
    26     /**
    27      * Setup test.
    28      */
    29     @BeforeAll
    30     public static void setUp() {
    31         JOSMFixture.createUnitTestFixture().init();
    32     }
    33 
    3423    /**
    3524     * Test to parse an empty string.
Note: See TracChangeset for help on using the changeset viewer.