Changeset 12634 in josm for trunk/test
- Timestamp:
- 2017-08-24T15:54:00+02:00 (8 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 5 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/MainTest.java
r12633 r12634 21 21 import org.openstreetmap.josm.Main.InitializationTask; 22 22 import org.openstreetmap.josm.actions.AboutAction; 23 import org.openstreetmap.josm.gui.DownloadParamType;24 23 import org.openstreetmap.josm.gui.MapFrameListener; 25 24 import org.openstreetmap.josm.io.OnlineResource; … … 40 39 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 41 40 public JOSMTestRules test = new JOSMTestRules().platform().https().devAPI().main().projection(); 42 43 /**44 * Unit test of {@link DownloadParamType#paramType} method.45 */46 @Test47 public void testParamType() {48 assertEquals(DownloadParamType.bounds, DownloadParamType.paramType("48.000,16.000,48.001,16.001"));49 assertEquals(DownloadParamType.fileName, DownloadParamType.paramType("data.osm"));50 assertEquals(DownloadParamType.fileUrl, DownloadParamType.paramType("file:///home/foo/data.osm"));51 assertEquals(DownloadParamType.fileUrl, DownloadParamType.paramType("file://C:\\Users\\foo\\data.osm"));52 assertEquals(DownloadParamType.httpUrl, DownloadParamType.paramType("http://somewhere.com/data.osm"));53 assertEquals(DownloadParamType.httpUrl, DownloadParamType.paramType("https://somewhere.com/data.osm"));54 }55 41 56 42 /** -
trunk/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java
r12633 r12634 47 47 @Rule 48 48 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") 49 public JOSMTestRules test = new JOSMTestRules(). platform().main();49 public JOSMTestRules test = new JOSMTestRules().main().https().devAPI().timeout(20000); 50 50 51 51 @SuppressFBWarnings(value = "DM_DEFAULT_ENCODING") … … 85 85 public void testShowHelp() throws Exception { 86 86 testShow("--help", MainApplication.getHelp().trim()); 87 } 88 89 /** 90 * Unit test of {@link DownloadParamType#paramType} method. 91 */ 92 @Test 93 public void testParamType() { 94 assertEquals(DownloadParamType.bounds, DownloadParamType.paramType("48.000,16.000,48.001,16.001")); 95 assertEquals(DownloadParamType.fileName, DownloadParamType.paramType("data.osm")); 96 assertEquals(DownloadParamType.fileUrl, DownloadParamType.paramType("file:///home/foo/data.osm")); 97 assertEquals(DownloadParamType.fileUrl, DownloadParamType.paramType("file://C:\\Users\\foo\\data.osm")); 98 assertEquals(DownloadParamType.httpUrl, DownloadParamType.paramType("http://somewhere.com/data.osm")); 99 assertEquals(DownloadParamType.httpUrl, DownloadParamType.paramType("https://somewhere.com/data.osm")); 87 100 } 88 101 -
trunk/test/unit/org/openstreetmap/josm/gui/io/CustomConfiguratorTest.java
r12633 r12634 1 1 // License: GPL. For details, see LICENSE file. 2 package org.openstreetmap.josm. data;2 package org.openstreetmap.josm.gui.io; 3 3 4 4 import static org.junit.Assert.assertEquals; … … 18 18 import org.openstreetmap.josm.Main; 19 19 import org.openstreetmap.josm.TestUtils; 20 import org.openstreetmap.josm.data.CustomConfigurator.PreferencesUtils; 20 import org.openstreetmap.josm.data.Preferences; 21 import org.openstreetmap.josm.data.PreferencesUtils; 22 import org.openstreetmap.josm.gui.io.CustomConfigurator; 21 23 import org.openstreetmap.josm.testutils.JOSMTestRules; 22 24 import org.openstreetmap.josm.tools.Utils; -
trunk/test/unit/org/openstreetmap/josm/gui/layer/AutosaveTaskTest.java
r12633 r12634 1 1 // License: GPL. For details, see LICENSE file. 2 package org.openstreetmap.josm. data;2 package org.openstreetmap.josm.gui.layer; 3 3 4 4 import static org.junit.Assert.assertEquals; … … 23 23 import org.junit.Test; 24 24 import org.openstreetmap.josm.Main; 25 import org.openstreetmap.josm.data.AutosaveTask.AutosaveLayerInfo;26 25 import org.openstreetmap.josm.data.coor.LatLon; 27 26 import org.openstreetmap.josm.data.osm.DataSet; 28 27 import org.openstreetmap.josm.data.osm.Node; 28 import org.openstreetmap.josm.gui.layer.AutosaveTask; 29 29 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 30 import org.openstreetmap.josm.gui.layer.AutosaveTask.AutosaveLayerInfo; 30 31 import org.openstreetmap.josm.testutils.JOSMTestRules; 31 32 -
trunk/test/unit/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUITest.java
r10989 r12634 6 6 import org.junit.Rule; 7 7 import org.junit.Test; 8 import org.openstreetmap.josm. Main;8 import org.openstreetmap.josm.gui.MainApplication; 9 9 import org.openstreetmap.josm.testutils.JOSMTestRules; 10 10 … … 28 28 @Test 29 29 public void testFullyAutomaticAuthorizationUI() { 30 assertNotNull(new FullyAutomaticAuthorizationUI("", Main.worker)); 30 assertNotNull(new FullyAutomaticAuthorizationUI("", MainApplication.worker)); 31 31 } 32 32 } -
trunk/test/unit/org/openstreetmap/josm/gui/oauth/ManualAuthorizationUITest.java
r10989 r12634 6 6 import org.junit.Rule; 7 7 import org.junit.Test; 8 import org.openstreetmap.josm. Main;8 import org.openstreetmap.josm.gui.MainApplication; 9 9 import org.openstreetmap.josm.testutils.JOSMTestRules; 10 10 … … 28 28 @Test 29 29 public void testManualAuthorizationUI() { 30 assertNotNull(new ManualAuthorizationUI("", Main.worker)); 30 assertNotNull(new ManualAuthorizationUI("", MainApplication.worker)); 31 31 } 32 32 } -
trunk/test/unit/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorizationUITest.java
r10989 r12634 6 6 import org.junit.Rule; 7 7 import org.junit.Test; 8 import org.openstreetmap.josm. Main;8 import org.openstreetmap.josm.gui.MainApplication; 9 9 import org.openstreetmap.josm.testutils.JOSMTestRules; 10 10 … … 28 28 @Test 29 29 public void testSemiAutomaticAuthorizationUI() { 30 assertNotNull(new SemiAutomaticAuthorizationUI("", Main.worker)); 30 assertNotNull(new SemiAutomaticAuthorizationUI("", MainApplication.worker)); 31 31 } 32 32 }
Note:
See TracChangeset
for help on using the changeset viewer.