Ignore:
Timestamp:
2020-10-28T20:41:00+01:00 (6 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/command/RemoveNodesCommandTest.java

    r15013 r17275  
    22package org.openstreetmap.josm.command;
    33
    4 import static org.junit.Assert.assertArrayEquals;
    5 import static org.junit.Assert.assertFalse;
    6 import static org.junit.Assert.assertTrue;
     4import static org.junit.jupiter.api.Assertions.assertArrayEquals;
     5import static org.junit.jupiter.api.Assertions.assertFalse;
     6import static org.junit.jupiter.api.Assertions.assertTrue;
    77
    88import java.util.ArrayList;
    99import java.util.Collections;
    1010
    11 import org.junit.Before;
    12 import org.junit.Rule;
    13 import org.junit.Test;
     11import org.junit.jupiter.api.BeforeEach;
     12import org.junit.jupiter.api.Test;
     13import org.junit.jupiter.api.extension.RegisterExtension;
    1414import org.openstreetmap.josm.TestUtils;
    1515import org.openstreetmap.josm.command.CommandTest.CommandTestDataWithRelation;
     
    2828 * Unit tests of {@link RemoveNodesCommand} class.
    2929 */
    30 public class RemoveNodesCommandTest {
     30class RemoveNodesCommandTest {
    3131
    3232    /**
    3333     * We need prefs for nodes.
    3434     */
    35     @Rule
     35    @RegisterExtension
    3636    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
    3737    public JOSMTestRules test = new JOSMTestRules().preferences();
     
    4141     * Set up the test data.
    4242     */
    43     @Before
     43    @BeforeEach
    4444    public void createTestData() {
    4545        testData = new CommandTestDataWithRelation();
     
    5050     */
    5151    @Test
    52     public void testExecute() {
     52    void testExecute() {
    5353        RemoveNodesCommand command = new RemoveNodesCommand(testData.existingWay,
    5454                Collections.singleton(testData.existingNode));
     
    6565     */
    6666    @Test
    67     public void testUndo() {
     67    void testUndo() {
    6868        RemoveNodesCommand command = new RemoveNodesCommand(testData.existingWay,
    6969                Collections.singleton(testData.existingNode));
     
    8787     */
    8888    @Test
    89     public void testFillModifiedData() {
     89    void testFillModifiedData() {
    9090        ArrayList<OsmPrimitive> modified = new ArrayList<>();
    9191        ArrayList<OsmPrimitive> deleted = new ArrayList<>();
     
    103103     */
    104104    @Test
    105     public void testGetParticipatingPrimitives() {
     105    void testGetParticipatingPrimitives() {
    106106        RemoveNodesCommand command = new RemoveNodesCommand(testData.existingWay,
    107107                Collections.singleton(testData.existingNode));
     
    114114     */
    115115    @Test
    116     public void testDescription() {
     116    void testDescription() {
    117117        assertTrue(new RemoveNodesCommand(testData.existingWay, Collections.singleton(testData.existingNode))
    118118                .getDescriptionText().matches("Removed nodes from .*"));
     
    123123     */
    124124    @Test
    125     public void testEqualsContract() {
     125    void testEqualsContract() {
    126126        TestUtils.assumeWorkingEqualsVerifier();
    127127        EqualsVerifier.forClass(RemoveNodesCommand.class).usingGetClass()
Note: See TracChangeset for help on using the changeset viewer.