Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.actions;
|
---|
3 |
|
---|
4 | import static org.junit.jupiter.api.Assertions.assertEquals;
|
---|
5 |
|
---|
6 | import org.junit.jupiter.api.extension.RegisterExtension;
|
---|
7 | import org.junit.jupiter.api.Test;
|
---|
8 | import org.openstreetmap.josm.data.osm.DataSet;
|
---|
9 | import org.openstreetmap.josm.gui.MainApplication;
|
---|
10 | import org.openstreetmap.josm.testutils.JOSMTestRules;
|
---|
11 |
|
---|
12 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
---|
13 |
|
---|
14 | /**
|
---|
15 | * Unit tests for class {@link SelectAllAction}.
|
---|
16 | */
|
---|
17 | final class SelectAllActionTest {
|
---|
18 |
|
---|
19 | /**
|
---|
20 | * Setup test.
|
---|
21 | */
|
---|
22 | @RegisterExtension
|
---|
23 | @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
---|
24 | public JOSMTestRules rules = new JOSMTestRules().preferences().projection().main();
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * Unit test of {@link SelectAllAction#actionPerformed} method.
|
---|
28 | */
|
---|
29 | @Test
|
---|
30 | void testActionPerformed() {
|
---|
31 | SelectByInternalPointActionTest.initDataSet();
|
---|
32 | DataSet ds = MainApplication.getLayerManager().getEditDataSet();
|
---|
33 |
|
---|
34 | assertEquals(0, ds.getSelected().size());
|
---|
35 | new SelectAllAction().actionPerformed(null);
|
---|
36 | assertEquals(6, ds.getSelected().size());
|
---|
37 | }
|
---|
38 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.