From d4ce87a655e210cfb62dac00a972cced9e82806c Mon Sep 17 00:00:00 2001
From: Robert Scott <code@humanleg.org.uk>
Date: Thu, 23 Aug 2018 21:45:06 +0100
Subject: [PATCH v1 1/3] tests: RemoteControlTest: convert from JOSMFixture to
JOSMTestRules
---
.../openstreetmap/josm/io/remotecontrol/RemoteControlTest.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/test/unit/org/openstreetmap/josm/io/remotecontrol/RemoteControlTest.java b/test/unit/org/openstreetmap/josm/io/remotecontrol/RemoteControlTest.java
index f390b8962..401cebbe1 100644
a
|
b
|
import javax.net.ssl.X509TrustManager;
|
25 | 25 | |
26 | 26 | import org.junit.After; |
27 | 27 | import org.junit.Before; |
| 28 | import org.junit.Rule; |
28 | 29 | import org.junit.Test; |
29 | 30 | import org.openstreetmap.josm.JOSMFixture; |
30 | 31 | import org.openstreetmap.josm.TestUtils; |
31 | 32 | import org.openstreetmap.josm.spi.preferences.Config; |
| 33 | import org.openstreetmap.josm.testutils.JOSMTestRules; |
32 | 34 | import org.openstreetmap.josm.tools.Logging; |
33 | 35 | import org.openstreetmap.josm.tools.PlatformHookWindows; |
34 | 36 | import org.openstreetmap.josm.tools.PlatformManager; |
… |
… |
public class RemoteControlTest {
|
53 | 55 | } |
54 | 56 | |
55 | 57 | /** |
| 58 | * Setup test. |
| 59 | */ |
| 60 | @Rule |
| 61 | @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") |
| 62 | public JOSMTestRules test = new JOSMTestRules().preferences().https().assertionsInEDT(); |
| 63 | |
| 64 | /** |
56 | 65 | * Starts Remote control before testing requests. |
57 | 66 | * @throws GeneralSecurityException if a security error occurs |
58 | 67 | */ |
59 | 68 | @Before |
60 | 69 | public void setUp() throws GeneralSecurityException { |
61 | | JOSMFixture.createUnitTestFixture().init(); |
62 | 70 | RemoteControl.PROP_REMOTECONTROL_HTTPS_ENABLED.put(true); |
63 | 71 | deleteKeystore(); |
64 | 72 | |