Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.gui.preferences.advanced;
|
---|
3 |
|
---|
4 | import javax.swing.JOptionPane;
|
---|
5 |
|
---|
6 | import org.junit.Rule;
|
---|
7 | import org.junit.Test;
|
---|
8 | import org.openstreetmap.josm.Main;
|
---|
9 | import org.openstreetmap.josm.testutils.JOSMTestRules;
|
---|
10 | import org.openstreetmap.josm.testutils.mockers.JOptionPaneSimpleMocker;
|
---|
11 |
|
---|
12 | import com.google.common.collect.ImmutableMap;
|
---|
13 |
|
---|
14 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
---|
15 |
|
---|
16 | /**
|
---|
17 | * Unit tests of {@link ExportProfileAction} class.
|
---|
18 | */
|
---|
19 | public class ExportProfileActionTest {
|
---|
20 | /**
|
---|
21 | * Setup tests
|
---|
22 | */
|
---|
23 | @Rule
|
---|
24 | @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
---|
25 | public JOSMTestRules test = new JOSMTestRules().preferences().assertionsInEDT();
|
---|
26 |
|
---|
27 | /**
|
---|
28 | * Unit test of {@link ExportProfileAction#actionPerformed}.
|
---|
29 | */
|
---|
30 | @Test
|
---|
31 | public void testAction() {
|
---|
32 | new JOptionPaneSimpleMocker(ImmutableMap.of(
|
---|
33 | "All the preferences of this group are default, nothing to save", JOptionPane.OK_OPTION
|
---|
34 | ));
|
---|
35 | new ExportProfileAction(Main.pref, "foo", "bar").actionPerformed(null);
|
---|
36 | new ExportProfileAction(Main.pref, "expert", "expert").actionPerformed(null);
|
---|
37 | }
|
---|
38 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.