Changeset 14119 in josm for trunk/test
- Timestamp:
- 2018-08-11T16:10:32+02:00 (6 years ago)
- Location:
- trunk/test
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/functional/org/openstreetmap/josm/io/OsmServerHistoryReaderTest.java
r12850 r14119 24 24 public static void init() { 25 25 JOSMFixture.createUnitTestFixture().init(); 26 Config.getPref().put("osm-server.url", OsmApi.DEFAULT_API_URL);26 Config.getPref().put("osm-server.url", Config.getUrls().getDefaultOsmApiUrl()); 27 27 } 28 28 -
trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java
r14079 r14119 17 17 import org.openstreetmap.josm.command.DeleteCommand; 18 18 import org.openstreetmap.josm.data.preferences.JosmBaseDirectories; 19 import org.openstreetmap.josm.data.preferences.JosmUrls; 19 20 import org.openstreetmap.josm.data.projection.Projections; 20 21 import org.openstreetmap.josm.gui.MainApplication; … … 101 102 Config.setPreferencesInstance(Main.pref); 102 103 Config.setBaseDirectoriesProvider(JosmBaseDirectories.getInstance()); 104 Config.setUrlsProvider(JosmUrls.getInstance()); 103 105 Main.pref.resetToInitialState(); 104 106 Main.pref.enableSaveOnPut(false); -
trunk/test/unit/org/openstreetmap/josm/MainTest.java
r13812 r14119 39 39 Main.preConstructorInit(); 40 40 assertNotNull(Main.getProjection()); 41 }42 43 /**44 * Unit test of {@link Main#getBaseUserUrl}.45 */46 @Test47 public void testGetBaseUserUrl() {48 assertEquals("https://api06.dev.openstreetmap.org/user", Main.getBaseUserUrl());49 41 } 50 42 -
trunk/test/unit/org/openstreetmap/josm/data/oauth/OAuthParametersTest.java
r13812 r14119 9 9 import org.junit.Test; 10 10 import org.openstreetmap.josm.TestUtils; 11 import org.openstreetmap.josm. io.OsmApi;11 import org.openstreetmap.josm.spi.preferences.Config; 12 12 import org.openstreetmap.josm.testutils.JOSMTestRules; 13 13 import org.openstreetmap.josm.tools.Logging; … … 36 36 OAuthParameters def = OAuthParameters.createDefault(); 37 37 assertNotNull(def); 38 assertEquals(def, OAuthParameters.createDefault( OsmApi.DEFAULT_API_URL));38 assertEquals(def, OAuthParameters.createDefault(Config.getUrls().getDefaultOsmApiUrl())); 39 39 OAuthParameters dev = OAuthParameters.createDefault("https://api06.dev.openstreetmap.org/api"); 40 40 assertNotNull(dev); -
trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ApiUrlTestTaskTest.java
r10980 r14119 11 11 import org.junit.Rule; 12 12 import org.junit.Test; 13 import org.openstreetmap.josm. io.OsmApi;13 import org.openstreetmap.josm.spi.preferences.Config; 14 14 import org.openstreetmap.josm.testutils.JOSMTestRules; 15 15 … … 43 43 @Test 44 44 public void testNominalUrl() { 45 ApiUrlTestTask task = new ApiUrlTestTask(PARENT, OsmApi.DEFAULT_API_URL);45 ApiUrlTestTask task = new ApiUrlTestTask(PARENT, Config.getUrls().getDefaultOsmApiUrl()); 46 46 task.run(); 47 47 assertTrue(task.isSuccess()); -
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/LinkTest.java
r9996 r14119 13 13 import org.junit.Test; 14 14 import org.openstreetmap.josm.JOSMFixture; 15 import org.openstreetmap.josm.Main;16 15 import org.openstreetmap.josm.data.osm.OsmPrimitive; 16 import org.openstreetmap.josm.spi.preferences.Config; 17 17 18 18 /** … … 40 40 assertEquals(0, p.getComponentCount()); 41 41 42 l.href = Main.getJOSMWebsite();42 l.href = Config.getUrls().getJOSMWebsite(); 43 43 assertFalse(l.addToPanel(p, Collections.<OsmPrimitive>emptyList(), false)); 44 44 assertTrue(p.getComponentCount() > 0); 45 45 46 l.locale_href = Main.getJOSMWebsite();46 l.locale_href = Config.getUrls().getJOSMWebsite(); 47 47 assertFalse(l.addToPanel(p, Collections.<OsmPrimitive>emptyList(), false)); 48 48 assertTrue(p.getComponentCount() > 0); -
trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java
r14052 r14119 15 15 import java.util.logging.Handler; 16 16 17 import org.awaitility.Awaitility; 17 18 import org.junit.rules.TemporaryFolder; 18 19 import org.junit.rules.TestRule; … … 30 31 import org.openstreetmap.josm.data.osm.event.SelectionEventManager; 31 32 import org.openstreetmap.josm.data.preferences.JosmBaseDirectories; 33 import org.openstreetmap.josm.data.preferences.JosmUrls; 32 34 import org.openstreetmap.josm.data.projection.Projections; 33 35 import org.openstreetmap.josm.gui.MainApplication; … … 53 55 import org.openstreetmap.josm.tools.Territories; 54 56 import org.openstreetmap.josm.tools.date.DateUtils; 55 56 import org.awaitility.Awaitility;57 57 58 58 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; … … 420 420 Config.setPreferencesInstance(Main.pref); 421 421 Config.setBaseDirectoriesProvider(JosmBaseDirectories.getInstance()); 422 Config.setUrlsProvider(JosmUrls.getInstance()); 422 423 // All tests use the same timezone. 423 424 TimeZone.setDefault(DateUtils.UTC); -
trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookOsxTest.java
r12802 r14119 15 15 import org.openstreetmap.josm.JOSMFixture; 16 16 import org.openstreetmap.josm.Main; 17 import org.openstreetmap.josm.spi.preferences.Config; 17 18 18 19 /** … … 64 65 public void testOpenUrl() throws IOException { 65 66 if (!Main.isPlatformWindows()) { 66 hook.openUrl( Main.getJOSMWebsite());67 hook.openUrl(Config.getUrls().getJOSMWebsite()); 67 68 } else { 68 69 try { 69 hook.openUrl( Main.getJOSMWebsite());70 hook.openUrl(Config.getUrls().getJOSMWebsite()); 70 71 fail("Expected IOException"); 71 72 } catch (IOException e) { -
trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java
r12802 r14119 22 22 import org.openstreetmap.josm.io.remotecontrol.RemoteControlHttpsServer; 23 23 import org.openstreetmap.josm.io.remotecontrol.RemoteControlTest; 24 import org.openstreetmap.josm.spi.preferences.Config; 24 25 25 26 /** … … 119 120 public void testOpenUrl() throws IOException { 120 121 if (Main.isPlatformWindows()) { 121 hook.openUrl( Main.getJOSMWebsite());122 } else { 123 try { 124 hook.openUrl( Main.getJOSMWebsite());122 hook.openUrl(Config.getUrls().getJOSMWebsite()); 123 } else { 124 try { 125 hook.openUrl(Config.getUrls().getJOSMWebsite()); 125 126 fail("Expected IOException"); 126 127 } catch (IOException e) {
Note:
See TracChangeset
for help on using the changeset viewer.