From 5181e6bb1268a7e4f9114bc26ecbe5cd65544645 Mon Sep 17 00:00:00 2001
From: Robert Scott <code@humanleg.org.uk>
Date: Sat, 18 Nov 2017 17:45:32 +0000
Subject: [PATCH v1 3/6] MinimapDialogTest: add .commands() to JOSMTestRules
---
test/unit/org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/unit/org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java b/test/unit/org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java
index e302a7c51..708685fa3 100644
|
a
|
b
|
public class MinimapDialogTest {
|
| 40 | 40 | */ |
| 41 | 41 | @Rule |
| 42 | 42 | @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") |
| 43 | | public JOSMTestRules josmTestRules = new JOSMTestRules().main().platform().projection().fakeImagery(); |
| | 43 | public JOSMTestRules josmTestRules = new JOSMTestRules().main().commands().platform().projection().fakeImagery(); |
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * Unit test of {@link MinimapDialog} class. |
| … |
… |
public class MinimapDialogTest {
|
| 54 | 54 | assertFalse(dlg.isVisible()); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | | protected void assertSingleSelectedSourceLabel(String label) { |
| | 57 | protected void assertSingleSelectedSourceLabel(final String label) { |
| 58 | 58 | JPopupMenu menu = this.sourceButton.getPopupMenu(); |
| 59 | 59 | boolean found = false; |
| 60 | 60 | for (Component c: menu.getComponents()) { |
| … |
… |
public class MinimapDialogTest {
|
| 73 | 73 | assertTrue("Selected source not found in menu", found); |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | | protected JMenuItem getSourceMenuItemByLabel(String label) { |
| | 76 | protected JMenuItem getSourceMenuItemByLabel(final String label) { |
| 77 | 77 | JPopupMenu menu = this.sourceButton.getPopupMenu(); |
| 78 | 78 | for (Component c: menu.getComponents()) { |
| 79 | 79 | if (JPopupMenu.Separator.class.isInstance(c)) { |