Ignore:
Timestamp:
2023-03-21T14:49:10+01:00 (21 months ago)
Author:
taylor.smock
Message:

See #16567: Convert most plugin tests to JUnit 5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/o5m/test/unit/org/openstreetmap/josm/plugins/o5m/io/O5mImporterTest.java

    r34837 r36064  
    22package org.openstreetmap.josm.plugins.o5m.io;
    33
    4 import static org.junit.Assert.assertEquals;
    5 import static org.junit.Assert.assertNotNull;
    6 import static org.junit.Assert.assertNull;
     4import static org.junit.jupiter.api.Assertions.assertEquals;
     5import static org.junit.jupiter.api.Assertions.assertNotNull;
     6import static org.junit.jupiter.api.Assertions.assertNull;
    77
    88import java.io.IOException;
    99
    10 import org.junit.Rule;
    11 import org.junit.Test;
     10import org.junit.jupiter.api.Assertions;
     11import org.junit.jupiter.api.Test;
    1212import org.openstreetmap.josm.TestUtils;
    1313import org.openstreetmap.josm.data.osm.DataSet;
     
    1616import org.openstreetmap.josm.data.osm.User;
    1717import org.openstreetmap.josm.io.IllegalDataException;
    18 import org.openstreetmap.josm.testutils.JOSMTestRules;
     18import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
    1919
    2020/**
    2121 * Unit tests for {@link O5mImporter}.
    2222 */
    23 public class O5mImporterTest {
    24 
    25     /**
    26      * Setup test.
    27      */
    28     @Rule
    29     public JOSMTestRules rules = new JOSMTestRules().preferences();
    30 
     23@BasicPreferences
     24class O5mImporterTest {
    3125    private static void checkUserNull(OsmPrimitive osm, boolean hasToBeNull) {
    3226        User usr = osm.getUser();
    3327        if (hasToBeNull) {
    34             assertNull(osm + " -> " + usr, usr);
     28            assertNull(usr, osm + " -> " + usr);
    3529        } else {
    36             assertNotNull(osm + " -> " + usr, usr);
     30            assertNotNull(usr, osm + " -> " + usr);
    3731        }
    3832    }
     
    5650     */
    5751    @Test
    58     public void testParseDataSet() throws Exception {
     52    void testParseDataSet() throws Exception {
    5953        doTestMonaco(TestUtils.getTestDataRoot() + "/monaco-latest.o5m", false);
    6054    }
     
    6660     */
    6761    @Test
    68     public void testParseDataSetDropVersion() throws Exception {
     62    void testParseDataSetDropVersion() throws Exception {
    6963        doTestMonaco(TestUtils.getTestDataRoot() + "/monaco-drop-version.o5m", true);
    7064    }
Note: See TracChangeset for help on using the changeset viewer.