Ignore:
Timestamp:
2020-10-28T20:41:00+01:00 (3 years ago)
Author:
Don-vip
Message:

see #16567 - upgrade almost all tests to JUnit 5, except those depending on WiremockRule

See https://github.com/tomakehurst/wiremock/issues/684

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/io/session/SessionReaderTest.java

    r15070 r17275  
    22package org.openstreetmap.josm.io.session;
    33
    4 import static org.junit.Assert.assertEquals;
    5 import static org.junit.Assert.assertNotNull;
    6 import static org.junit.Assert.assertTrue;
     4import static org.junit.jupiter.api.Assertions.assertEquals;
     5import static org.junit.jupiter.api.Assertions.assertNotNull;
     6import static org.junit.jupiter.api.Assertions.assertTrue;
    77
    88import java.io.ByteArrayInputStream;
     
    1313import java.util.List;
    1414
    15 import org.junit.Rule;
    16 import org.junit.Test;
     15import org.junit.jupiter.api.extension.RegisterExtension;
     16import org.junit.jupiter.api.Test;
    1717import org.openstreetmap.josm.TestUtils;
    1818import org.openstreetmap.josm.data.coor.EastNorth;
     
    3333 * Unit tests for Session reading.
    3434 */
    35 public class SessionReaderTest {
     35class SessionReaderTest {
    3636
    3737    /**
    3838     * Setup tests.
    3939     */
    40     @Rule
     40    @RegisterExtension
    4141    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    4242    public JOSMTestRules test = new JOSMTestRules().projection();
     
    6060     */
    6161    @Test
    62     public void testReadEmpty() throws IOException, IllegalDataException {
     62    void testReadEmpty() throws IOException, IllegalDataException {
    6363        assertTrue(testRead("empty.jos").isEmpty());
    6464        assertTrue(testRead("empty.joz").isEmpty());
     
    7171     */
    7272    @Test
    73     public void testReadOsm() throws IOException, IllegalDataException {
     73    void testReadOsm() throws IOException, IllegalDataException {
    7474        for (String file : new String[]{"osm.jos", "osm.joz"}) {
    7575            List<Layer> layers = testRead(file);
     
    8787     */
    8888    @Test
    89     public void testReadGpx() throws IOException, IllegalDataException {
     89    void testReadGpx() throws IOException, IllegalDataException {
    9090        for (String file : new String[]{"gpx.jos", "gpx.joz", "nmea.jos"}) {
    9191            List<Layer> layers = testRead(file);
     
    103103     */
    104104    @Test
    105     public void testReadGpxAndMarker() throws IOException, IllegalDataException {
     105    void testReadGpxAndMarker() throws IOException, IllegalDataException {
    106106        List<Layer> layers = testRead("gpx_markers.joz");
    107107        assertEquals(layers.size(), 2);
     
    127127     */
    128128    @Test
    129     public void testReadImage() throws IOException, IllegalDataException {
     129    void testReadImage() throws IOException, IllegalDataException {
    130130        final List<Layer> layers = testRead("bing.jos");
    131131        assertEquals(layers.size(), 1);
     
    144144     */
    145145    @Test
    146     public void testReadNotes() throws IOException, IllegalDataException {
     146    void testReadNotes() throws IOException, IllegalDataException {
    147147        if (MainApplication.isDisplayingMapView()) {
    148148            for (NoteLayer nl : MainApplication.getLayerManager().getLayersOfType(NoteLayer.class)) {
     
    163163     */
    164164    @Test
    165     public void testTicket17701() throws Exception {
     165    void testTicket17701() throws Exception {
    166166        try (InputStream in = new ByteArrayInputStream(("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
    167167                "<josm-session version=\"0.1\">\n" +
Note: See TracChangeset for help on using the changeset viewer.