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

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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/data/PrimitiveTagTransferDataTest.java

    r10737 r17275  
    22package org.openstreetmap.josm.gui.datatransfer.data;
    33
    4 import static org.junit.Assert.assertEquals;
    5 import static org.junit.Assert.assertFalse;
    6 import static org.junit.Assert.assertTrue;
     4import static org.junit.jupiter.api.Assertions.assertEquals;
     5import static org.junit.jupiter.api.Assertions.assertFalse;
     6import static org.junit.jupiter.api.Assertions.assertTrue;
    77
    88import java.util.Arrays;
    99import java.util.Map;
    1010
    11 import org.junit.Rule;
    12 import org.junit.Test;
     11import org.junit.jupiter.api.extension.RegisterExtension;
     12import org.junit.jupiter.api.Test;
    1313import org.openstreetmap.josm.data.osm.Node;
    1414import org.openstreetmap.josm.data.osm.NodeData;
     
    2626 * @author Michael Zangl
    2727 */
    28 public class PrimitiveTagTransferDataTest {
     28class PrimitiveTagTransferDataTest {
    2929    /**
    3030     * Prefs only required because of the dependencies of OSM primitives.
    3131     */
    32     @Rule
     32    @RegisterExtension
    3333    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    3434    public JOSMTestRules test = new JOSMTestRules().preferences();
     
    4242     */
    4343    @Test
    44     public void testPrimitiveTagTransferDataPrimitiveTransferData() {
     44    void testPrimitiveTagTransferDataPrimitiveTransferData() {
    4545        PrimitiveTagTransferData data = new PrimitiveTagTransferData(PrimitiveTransferData.getData(Arrays.asList(new Node(), new Node())));
    4646        assertEquals(2, data.getSourcePrimitiveCount(OsmPrimitiveType.NODE));
     
    5353     */
    5454    @Test
    55     public void testIsHeterogeneousSource() {
     55    void testIsHeterogeneousSource() {
    5656        // 0 item
    5757        assertFalse(isHeterogeneousSource());
     
    7474     */
    7575    @Test
    76     public void testGetForPrimitives() {
     76    void testGetForPrimitives() {
    7777        PrimitiveTagTransferData data = createTestData();
    7878        TagCollection forNode = data.getForPrimitives(OsmPrimitiveType.NODE);
     
    100100     */
    101101    @Test
    102     public void testGetSourcePrimitiveCount() {
     102    void testGetSourcePrimitiveCount() {
    103103        PrimitiveTagTransferData data = createTestData();
    104104        assertEquals(2, data.getSourcePrimitiveCount(OsmPrimitiveType.NODE));
     
    111111     */
    112112    @Test
    113     public void testGetStatistics() {
     113    void testGetStatistics() {
    114114        PrimitiveTagTransferData data = createTestData();
    115115        Map<OsmPrimitiveType, Integer> stats = data.getStatistics();
Note: See TracChangeset for help on using the changeset viewer.