Changeset 11943 in josm for trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java
- Timestamp:
- 2017-04-17T14:07:04+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java
r11777 r11943 4 4 import java.io.File; 5 5 import java.io.IOException; 6 import java.security.GeneralSecurityException; 6 7 import java.text.MessageFormat; 7 8 import java.util.TimeZone; … … 17 18 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles; 18 19 import org.openstreetmap.josm.gui.util.GuiHelper; 20 import org.openstreetmap.josm.io.CertificateAmendment; 19 21 import org.openstreetmap.josm.io.OsmApi; 20 22 import org.openstreetmap.josm.io.OsmApiInitializationException; 21 23 import org.openstreetmap.josm.io.OsmTransferCanceledException; 22 24 import org.openstreetmap.josm.tools.I18n; 25 import org.openstreetmap.josm.tools.JosmRuntimeException; 23 26 import org.openstreetmap.josm.tools.Logging; 24 27 import org.openstreetmap.josm.tools.MemoryManagerTest; … … 46 49 private boolean allowMemoryManagerLeaks; 47 50 private boolean useMapStyles; 51 private boolean useHttps; 48 52 49 53 /** … … 137 141 public JOSMTestRules projection() { 138 142 useProjection = true; 143 return this; 144 } 145 146 /** 147 * Set up HTTPS certificates 148 * @return this instance, for easy chaining 149 */ 150 public JOSMTestRules https() { 151 useHttps = true; 139 152 return this; 140 153 } … … 222 235 } 223 236 237 // Set Platform 238 if (platform) { 239 Main.determinePlatformHook(); 240 } 241 242 if (useHttps) { 243 try { 244 CertificateAmendment.addMissingCertificates(); 245 } catch (IOException | GeneralSecurityException ex) { 246 throw new JosmRuntimeException(ex); 247 } 248 } 249 224 250 if (useProjection) { 225 251 Main.setProjection(Projections.getProjectionByCode("EPSG:3857")); // Mercator … … 241 267 throw new InitializationError(e); 242 268 } 243 }244 245 // Set Platform246 if (platform) {247 Main.determinePlatformHook();248 269 } 249 270
Note:
See TracChangeset
for help on using the changeset viewer.