Ignore:
Timestamp:
2016-06-08T09:22:56+02:00 (8 years ago)
Author:
Don-vip
Message:

fix unit tests

Location:
trunk/test/unit/org/openstreetmap/josm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/RemoteControlTest.java

    r10222 r10339  
    4646        JOSMFixture.createUnitTestFixture().init();
    4747        RemoteControl.PROP_REMOTECONTROL_HTTPS_ENABLED.put(true);
     48        deleteKeystore();
     49
     50        RemoteControl.start();
     51        disableCertificateValidation();
     52        httpBase = "http://127.0.0.1:"+Main.pref.getInteger("remote.control.port", 8111);
     53        httpsBase = "https://127.0.0.1:"+Main.pref.getInteger("remote.control.https.port", 8112);
     54    }
     55
     56    /**
     57     * Deletes JOSM keystore, if it exists.
     58     */
     59    public static void deleteKeystore() {
    4860        try {
    4961            Files.deleteIfExists(Paths.get(
     
    5264            Main.error(e);
    5365        }
    54 
    55         RemoteControl.start();
    56         disableCertificateValidation();
    57         httpBase = "http://127.0.0.1:"+Main.pref.getInteger("remote.control.port", 8111);
    58         httpsBase = "https://127.0.0.1:"+Main.pref.getInteger("remote.control.https.port", 8112);
    5966    }
    6067
  • trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookOsxTest.java

    r10337 r10339  
    6363    @Test
    6464    public void testOpenUrl() throws IOException {
    65         if (Main.isPlatformOsx()) {
     65        if (!Main.isPlatformWindows()) {
    6666            hook.openUrl(Main.getJOSMWebsite());
    6767        } else {
  • trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java

    r10337 r10339  
    2121import org.openstreetmap.josm.Main;
    2222import org.openstreetmap.josm.io.remotecontrol.RemoteControlHttpsServer;
     23import org.openstreetmap.josm.io.remotecontrol.RemoteControlTest;
    2324
    2425/**
     
    8889    @Test
    8990    public void testSetupHttpsCertificate() throws Exception {
     91        RemoteControlTest.deleteKeystore();
    9092        KeyStore ks = RemoteControlHttpsServer.loadJosmKeystore();
    9193        TrustedCertificateEntry trustedCert = new KeyStore.TrustedCertificateEntry(ks.getCertificate(ks.aliases().nextElement()));
Note: See TracChangeset for help on using the changeset viewer.