Changeset 10876 in josm for trunk/test/functional


Ignore:
Timestamp:
2016-08-22T22:05:45+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #13309 - fix unit tests (patch by michael2402) - gsoc-core

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/functional/org/openstreetmap/josm/tools/HttpClientTest.java

    r10758 r10876  
    2020import org.junit.Assert;
    2121import org.junit.Before;
    22 import org.junit.BeforeClass;
     22import org.junit.Rule;
    2323import org.junit.Test;
    24 import org.openstreetmap.josm.JOSMFixture;
    25 import org.openstreetmap.josm.Main;
    2624import org.openstreetmap.josm.TestUtils;
    2725import org.openstreetmap.josm.data.Version;
    2826import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     27import org.openstreetmap.josm.testutils.JOSMTestRules;
     28
     29import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2930
    3031/**
     
    3334public class HttpClientTest {
    3435
     36    @Rule
     37    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     38    public JOSMTestRules test = new JOSMTestRules().preferences();
     39
    3540    private ProgressMonitor progress;
    36 
    37     @BeforeClass
    38     public static void setUpBeforeClass() {
    39         JOSMFixture.createFunctionalTestFixture().init();
    40     }
    4141
    4242    @Before
     
    173173    @Test
    174174    public void testOpenUrlGzip() throws IOException {
    175         Main.initApplicationPreferences();
    176175        final URL url = new URL("https://www.openstreetmap.org/trace/1613906/data");
    177176        try (BufferedReader x = HttpClient.create(url).connect().uncompress(true).getContentReader()) {
     
    186185    @Test
    187186    public void testOpenUrlBzip() throws IOException {
    188         Main.initApplicationPreferences();
    189187        final URL url = new URL("https://www.openstreetmap.org/trace/785544/data");
    190188        try (BufferedReader x = HttpClient.create(url).connect().uncompress(true).getContentReader()) {
     
    199197    @Test
    200198    public void testTicket9660() throws IOException {
    201         Main.initApplicationPreferences();
    202199        final URL url = new URL("http://www.openstreetmap.org/trace/1350010/data");
    203200        try (BufferedReader x = HttpClient.create(url).connect()
Note: See TracChangeset for help on using the changeset viewer.