Changeset 17697 in josm for trunk/test
- Timestamp:
- 2021-03-30T21:49:32+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/RemoteControlTest.java
r17275 r17697 12 12 import java.nio.charset.StandardCharsets; 13 13 import java.security.GeneralSecurityException; 14 import java.security.KeyStore.TrustedCertificateEntry;15 14 import java.util.stream.Collectors; 16 15 … … 19 18 import org.junit.jupiter.api.Test; 20 19 import org.junit.jupiter.api.extension.RegisterExtension; 21 import org.openstreetmap.josm.TestUtils;22 20 import org.openstreetmap.josm.spi.preferences.Config; 23 21 import org.openstreetmap.josm.testutils.JOSMTestRules; 24 import org.openstreetmap.josm.tools.PlatformHookWindows;25 import org.openstreetmap.josm.tools.PlatformManager;26 22 27 23 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 28 import mockit.Mock;29 import mockit.MockUp;30 24 31 25 /** … … 35 29 36 30 private String httpBase; 37 38 private static class PlatformHookWindowsMock extends MockUp<PlatformHookWindows> {39 @Mock40 public boolean setupHttpsCertificate(String entryAlias, TrustedCertificateEntry trustedCert) {41 return true;42 }43 }44 31 45 32 /** … … 56 43 @BeforeEach 57 44 public void setUp() throws GeneralSecurityException { 58 if (PlatformManager.isPlatformWindows() && "True".equals(System.getenv("APPVEYOR"))) {59 // appveyor doesn't like us tinkering with the root keystore, so mock this out60 TestUtils.assumeWorkingJMockit();61 new PlatformHookWindowsMock();62 }63 64 45 RemoteControl.start(); 65 46 httpBase = "http://127.0.0.1:"+Config.getPref().getInt("remote.control.port", 8111);
Note:
See TracChangeset
for help on using the changeset viewer.