Changeset 18870 in josm for trunk/test/unit/org/openstreetmap/josm/command/ScaleCommandTest.java
- Timestamp:
- 2023-10-16T15:19:07+02:00 (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/command/ScaleCommandTest.java
r17275 r18870 7 7 import java.util.ArrayList; 8 8 import java.util.Arrays; 9 import java.util.Collections; 9 10 10 11 import org.junit.jupiter.api.BeforeEach; 11 12 import org.junit.jupiter.api.Test; 12 import org.junit.jupiter.api.extension.RegisterExtension;13 13 import org.openstreetmap.josm.TestUtils; 14 14 import org.openstreetmap.josm.command.CommandTest.CommandTestData; … … 20 20 import org.openstreetmap.josm.data.osm.User; 21 21 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 22 import org.openstreetmap.josm.testutils.JOSMTestRules; 22 import org.openstreetmap.josm.testutils.annotations.BasicPreferences; 23 import org.openstreetmap.josm.testutils.annotations.Projection; 23 24 24 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;25 25 import nl.jqno.equalsverifier.EqualsVerifier; 26 26 import nl.jqno.equalsverifier.Warning; … … 29 29 * Unit tests of {@link ScaleCommand} class. 30 30 */ 31 @BasicPreferences 32 @Projection 31 33 class ScaleCommandTest { 32 33 /**34 * We need prefs for nodes.35 */36 @RegisterExtension37 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")38 public JOSMTestRules test = new JOSMTestRules().preferences().projection();39 34 private CommandTestData testData; 40 35 … … 100 95 ArrayList<OsmPrimitive> deleted = new ArrayList<>(); 101 96 ArrayList<OsmPrimitive> added = new ArrayList<>(); 102 ScaleCommand command = new ScaleCommand( Arrays.asList(testData.existingNode),97 ScaleCommand command = new ScaleCommand(Collections.singletonList(testData.existingNode), 103 98 new EastNorth(0, 0)); 104 99 // intentionally empty … … 114 109 @Test 115 110 void testGetParticipatingPrimitives() { 116 ScaleCommand command = new ScaleCommand( Arrays.asList(testData.existingNode), new EastNorth(0, 0));111 ScaleCommand command = new ScaleCommand(Collections.singletonList(testData.existingNode), new EastNorth(0, 0)); 117 112 command.executeCommand(); 118 113 assertArrayEquals(new Object[] {testData.existingNode }, command.getParticipatingPrimitives().toArray()); … … 125 120 void testDescription() { 126 121 assertEquals("Scale 1 node", 127 new ScaleCommand( Arrays.asList(testData.existingNode), new EastNorth(0, 0))122 new ScaleCommand(Collections.singletonList(testData.existingNode), new EastNorth(0, 0)) 128 123 .getDescriptionText()); 129 124 assertEquals("Scale 2 nodes",
Note:
See TracChangeset
for help on using the changeset viewer.