Changeset 12637 in josm for trunk/test
- Timestamp:
- 2017-08-24T23:29:01+02:00 (7 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java
r12636 r12637 19 19 import org.openstreetmap.josm.data.projection.Projections; 20 20 import org.openstreetmap.josm.gui.MainApplication; 21 import org.openstreetmap.josm.gui.MainApplicationTest; 21 22 import org.openstreetmap.josm.gui.MainPanel; 22 23 import org.openstreetmap.josm.gui.layer.LayerManagerTest.TestLayer; 23 import org.openstreetmap.josm.gui.preferences.ToolbarPreferences;24 24 import org.openstreetmap.josm.gui.util.GuiHelper; 25 25 import org.openstreetmap.josm.io.CertificateAmendment; … … 201 201 * Make sure {@code Main.toolbar} is initialized. 202 202 */ 203 @SuppressWarnings("deprecation") 203 204 public static void initToolbar() { 205 MainApplicationTest.initToolbar(); 204 206 if (Main.toolbar == null) { 205 Main.toolbar = new ToolbarPreferences();207 Main.toolbar = MainApplication.getToolbar(); 206 208 } 207 209 } -
trunk/test/unit/org/openstreetmap/josm/MainTest.java
r12634 r12637 13 13 import java.util.Collection; 14 14 import java.util.Map; 15 16 import javax.swing.UIManager;17 15 18 16 import org.junit.Rule; … … 81 79 Main.preConstructorInit(); 82 80 assertNotNull(Main.getProjection()); 83 assertEquals(Main.pref.get("laf", Main.platform.getDefaultStyle()), UIManager.getLookAndFeel().getClass().getCanonicalName());84 assertNotNull(Main.toolbar);85 81 } 86 82 -
trunk/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java
r12636 r12637 19 19 import java.util.concurrent.Future; 20 20 21 import javax.swing.UIManager; 22 21 23 import org.junit.Rule; 22 24 import org.junit.Test; 25 import org.openstreetmap.josm.Main; 23 26 import org.openstreetmap.josm.TestUtils; 24 27 import org.openstreetmap.josm.data.Version; … … 26 29 import org.openstreetmap.josm.gui.SplashScreen.SplashProgressMonitor; 27 30 import org.openstreetmap.josm.gui.layer.GpxLayer; 31 import org.openstreetmap.josm.gui.preferences.ToolbarPreferences; 28 32 import org.openstreetmap.josm.plugins.PluginHandler; 29 33 import org.openstreetmap.josm.plugins.PluginHandlerTestIT; … … 47 51 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 48 52 public JOSMTestRules test = new JOSMTestRules().main().https().devAPI().timeout(20000); 53 54 /** 55 * Make sure {@link MainApplication#toolbar} is initialized. 56 */ 57 public static void initToolbar() { 58 if (MainApplication.toolbar == null) { 59 MainApplication.toolbar = new ToolbarPreferences(); 60 } 61 } 49 62 50 63 @SuppressFBWarnings(value = "DM_DEFAULT_ENCODING") … … 132 145 } 133 146 147 /** 148 * Unit test of {@link MainApplication#setupUIManager}. 149 */ 150 @Test 151 public void testSetupUIManager() { 152 MainApplication.setupUIManager(); 153 assertEquals(Main.pref.get("laf", Main.platform.getDefaultStyle()), UIManager.getLookAndFeel().getClass().getCanonicalName()); 154 } 155 134 156 private static PluginInformation newPluginInformation(String plugin) throws PluginListParseException { 135 157 return PluginListParser.createInfo(plugin+".jar", "https://svn.openstreetmap.org/applications/editors/josm/dist/"+plugin+".jar",
Note:
See TracChangeset
for help on using the changeset viewer.