Ignore:
Timestamp:
2016-09-05T01:10:07+02:00 (5 years ago)
Author:
Don-vip
Message:

improve unit tests

Location:
trunk/test/unit/org/openstreetmap/josm/gui/history
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/history/CoordinateInfoViewerTest.java

    r10108 r10962  
    44import static org.junit.Assert.assertNotNull;
    55
    6 import org.junit.BeforeClass;
     6import org.junit.Rule;
    77import org.junit.Test;
    8 import org.openstreetmap.josm.JOSMFixture;
     8import org.openstreetmap.josm.testutils.JOSMTestRules;
     9
     10import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    911
    1012/**
     
    1618     * Setup test.
    1719     */
    18     @BeforeClass
    19     public static void setUpBeforeClass() {
    20         JOSMFixture.createUnitTestFixture().init();
    21     }
     20    @Rule
     21    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     22    public JOSMTestRules test = new JOSMTestRules().preferences();
    2223
    2324    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/history/HistoryBrowserDialogTest.java

    r10108 r10962  
    66import java.util.Date;
    77
    8 import org.junit.BeforeClass;
     8import org.junit.Rule;
    99import org.junit.Test;
    10 import org.openstreetmap.josm.JOSMFixture;
    1110import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
    1211import org.openstreetmap.josm.data.osm.User;
     
    1514import org.openstreetmap.josm.data.osm.history.HistoryRelation;
    1615import org.openstreetmap.josm.data.osm.history.HistoryWay;
     16import org.openstreetmap.josm.testutils.JOSMTestRules;
    1717import org.openstreetmap.josm.tools.date.DateUtils;
     18
     19import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1820
    1921/**
     
    2527     * Setup test.
    2628     */
    27     @BeforeClass
    28     public static void setUpBeforeClass() {
    29         JOSMFixture.createUnitTestFixture().init();
    30     }
     29    @Rule
     30    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     31    public JOSMTestRules test = new JOSMTestRules();
    3132
    3233    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/history/HistoryBrowserModelTest.java

    r10195 r10962  
    88import static org.junit.Assert.assertTrue;
    99
    10 import org.junit.BeforeClass;
     10import org.junit.Rule;
    1111import org.junit.Test;
    12 import org.openstreetmap.josm.JOSMFixture;
    1312import org.openstreetmap.josm.data.osm.Node;
    1413import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
     
    2019import org.openstreetmap.josm.gui.history.HistoryBrowserModel.TagTableModel;
    2120import org.openstreetmap.josm.gui.history.HistoryBrowserModel.VersionTableModel;
     21import org.openstreetmap.josm.testutils.JOSMTestRules;
     22
     23import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2224
    2325/**
     
    2931     * Setup test.
    3032     */
    31     @BeforeClass
    32     public static void setUpBeforeClass() {
    33         JOSMFixture.createUnitTestFixture().init(true);
    34     }
     33    @Rule
     34    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     35    public JOSMTestRules test = new JOSMTestRules().preferences().devAPI();
    3536
    3637    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/history/HistoryLoadTaskTest.java

    r10006 r10962  
    77import java.io.InputStream;
    88
    9 import org.junit.BeforeClass;
     9import org.junit.Rule;
    1010import org.junit.Test;
    11 import org.openstreetmap.josm.JOSMFixture;
    1211import org.openstreetmap.josm.TestUtils;
    1312import org.openstreetmap.josm.data.osm.Node;
     
    2322import org.openstreetmap.josm.io.OsmServerHistoryReader;
    2423import org.openstreetmap.josm.io.OsmTransferException;
     24import org.openstreetmap.josm.testutils.JOSMTestRules;
    2525import org.xml.sax.SAXException;
     26
     27import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2628
    2729/**
     
    3335     * Setup test.
    3436     */
    35     @BeforeClass
    36     public static void setUpBeforeClass() {
    37         JOSMFixture.createUnitTestFixture().init();
    38     }
     37    @Rule
     38    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     39    public JOSMTestRules test = new JOSMTestRules().preferences().devAPI();
    3940
    4041    /**
  • trunk/test/unit/org/openstreetmap/josm/gui/history/NodeListViewerTest.java

    r9816 r10962  
    44import static org.junit.Assert.assertNotNull;
    55
     6import org.junit.Rule;
    67import org.junit.Test;
     8import org.openstreetmap.josm.testutils.JOSMTestRules;
     9
     10import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    711
    812/**
     
    1014 */
    1115public class NodeListViewerTest {
     16
     17    /**
     18     * Setup test.
     19     */
     20    @Rule
     21    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     22    public JOSMTestRules test = new JOSMTestRules().preferences();
    1223
    1324    /**
Note: See TracChangeset for help on using the changeset viewer.