Changeset 10019 in josm for trunk/test
- Timestamp:
- 2016-03-19T19:01:37+01:00 (9 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java
r9801 r10019 5 5 6 6 import java.io.File; 7 import java.io.IOException; 7 8 import java.nio.file.Paths; 8 9 import java.text.MessageFormat; … … 12 13 import org.openstreetmap.josm.gui.layer.Layer; 13 14 import org.openstreetmap.josm.gui.preferences.ToolbarPreferences; 15 import org.openstreetmap.josm.io.CertificateAmendment; 14 16 import org.openstreetmap.josm.io.OsmApi; 15 17 import org.openstreetmap.josm.tools.I18n; … … 93 95 I18n.set(Main.pref.get("language", "en")); 94 96 97 try { 98 CertificateAmendment.addMissingCertificates(); 99 } catch (IOException ex) { 100 throw new RuntimeException(ex); 101 } 102 95 103 // init projection 96 104 Main.setProjection(Projections.getProjectionByCode("EPSG:3857")); // Mercator -
trunk/test/unit/org/openstreetmap/josm/io/CertificateAmendmentTest.java
r9996 r10019 25 25 public static void setUp() throws IOException { 26 26 JOSMFixture.createUnitTestFixture().init(); 27 CertificateAmendment.addMissingCertificates();28 27 } 29 28 … … 70 69 } 71 70 72 private void connect(String url, boolean shouldWork) throws IOException { 71 /** 72 * Test overpass API. 73 * @throws IOException in case of I/O error 74 */ 75 @Test 76 public void testOverpass() throws IOException { 77 connect("https://overpass-api.de", true); 78 } 79 80 private static void connect(String url, boolean shouldWork) throws IOException { 73 81 URLConnection connection = new URL(url).openConnection(); 74 82 try { … … 76 84 } catch (SSLHandshakeException e) { 77 85 if (shouldWork) { 86 e.printStackTrace(); 78 87 Assert.fail("Untrusted: " + url); 79 88 } else {
Note:
See TracChangeset
for help on using the changeset viewer.