Ignore:
Timestamp:
2016-09-03T14:22:22+02:00 (5 years ago)
Author:
Don-vip
Message:

convert more unit tests to JOSMTestRules

Location:
trunk/test/unit/org/openstreetmap/josm/actions/mapmode
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/actions/mapmode/AddNoteActionTest.java

    r10436 r10945  
    77import java.util.Collections;
    88
    9 import org.junit.BeforeClass;
     9import org.junit.Rule;
    1010import org.junit.Test;
    11 import org.openstreetmap.josm.JOSMFixture;
    1211import org.openstreetmap.josm.Main;
    1312import org.openstreetmap.josm.data.notes.Note;
     
    1514import org.openstreetmap.josm.data.osm.NoteData;
    1615import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     16import org.openstreetmap.josm.testutils.JOSMTestRules;
     17
     18import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1719
    1820/**
     
    2426     * Setup test.
    2527     */
    26     @BeforeClass
    27     public static void setUp() {
    28         JOSMFixture.createUnitTestFixture().init(true);
    29     }
     28    @Rule
     29    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     30    public JOSMTestRules test = new JOSMTestRules().commands();
    3031
    3132    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/mapmode/DeleteActionTest.java

    r10436 r10945  
    55import static org.junit.Assert.assertTrue;
    66
    7 import org.junit.BeforeClass;
     7import org.junit.Rule;
    88import org.junit.Test;
    9 import org.openstreetmap.josm.JOSMFixture;
    109import org.openstreetmap.josm.Main;
    1110import org.openstreetmap.josm.data.osm.DataSet;
    1211import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     12import org.openstreetmap.josm.testutils.JOSMTestRules;
     13
     14import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1315
    1416/**
     
    2022     * Setup test.
    2123     */
    22     @BeforeClass
    23     public static void setUp() {
    24         JOSMFixture.createUnitTestFixture().init(true);
    25     }
     24    @Rule
     25    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     26    public JOSMTestRules test = new JOSMTestRules().platform().commands();
    2627
    2728    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/mapmode/DrawActionTest.java

    r10452 r10945  
    1414import javax.swing.JList;
    1515
    16 import org.junit.BeforeClass;
     16import org.junit.Rule;
    1717import org.junit.Test;
    18 import org.openstreetmap.josm.JOSMFixture;
    1918import org.openstreetmap.josm.Main;
    2019import org.openstreetmap.josm.data.coor.EastNorth;
     
    2625import org.openstreetmap.josm.gui.OsmPrimitivRenderer;
    2726import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     27import org.openstreetmap.josm.testutils.JOSMTestRules;
    2828import org.openstreetmap.josm.tools.Utils;
     29
     30import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    2931
    3032/**
     
    3638     * Setup test.
    3739     */
    38     @BeforeClass
    39     public static void setUpBeforeClass() {
    40         JOSMFixture.createUnitTestFixture().init(true);
    41     }
     40    @Rule
     41    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     42    public JOSMTestRules test = new JOSMTestRules().commands();
    4243
    4344    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ExtrudeActionTest.java

    r10436 r10945  
    55import static org.junit.Assert.assertTrue;
    66
    7 import org.junit.BeforeClass;
     7import org.junit.Rule;
    88import org.junit.Test;
    9 import org.openstreetmap.josm.JOSMFixture;
    109import org.openstreetmap.josm.Main;
    1110import org.openstreetmap.josm.data.osm.DataSet;
    1211import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     12import org.openstreetmap.josm.testutils.JOSMTestRules;
     13
     14import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1315
    1416/**
     
    2022     * Setup test.
    2123     */
    22     @BeforeClass
    23     public static void setUp() {
    24         JOSMFixture.createUnitTestFixture().init(true);
    25     }
     24    @Rule
     25    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     26    public JOSMTestRules test = new JOSMTestRules().platform().commands();
    2627
    2728    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyActionTest.java

    r10436 r10945  
    55import static org.junit.Assert.assertTrue;
    66
    7 import org.junit.BeforeClass;
     7import org.junit.Rule;
    88import org.junit.Test;
    9 import org.openstreetmap.josm.JOSMFixture;
    109import org.openstreetmap.josm.Main;
    1110import org.openstreetmap.josm.data.osm.DataSet;
    1211import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     12import org.openstreetmap.josm.testutils.JOSMTestRules;
     13
     14import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1315
    1416/**
     
    2022     * Setup test.
    2123     */
    22     @BeforeClass
    23     public static void setUp() {
    24         JOSMFixture.createUnitTestFixture().init(true);
    25     }
     24    @Rule
     25    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     26    public JOSMTestRules test = new JOSMTestRules().platform().commands();
    2627
    2728    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ParallelWayActionTest.java

    r10436 r10945  
    55import static org.junit.Assert.assertTrue;
    66
    7 import org.junit.BeforeClass;
     7import org.junit.Rule;
    88import org.junit.Test;
    9 import org.openstreetmap.josm.JOSMFixture;
    109import org.openstreetmap.josm.Main;
    1110import org.openstreetmap.josm.data.osm.DataSet;
    1211import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     12import org.openstreetmap.josm.testutils.JOSMTestRules;
     13
     14import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1315
    1416/**
     
    2022     * Setup test.
    2123     */
    22     @BeforeClass
    23     public static void setUp() {
    24         JOSMFixture.createUnitTestFixture().init(true);
    25     }
     24    @Rule
     25    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     26    public JOSMTestRules test = new JOSMTestRules().platform().commands();
    2627
    2728    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/mapmode/PlayHeadDragModeTest.java

    r10436 r10945  
    55import static org.junit.Assert.assertTrue;
    66
    7 import org.junit.BeforeClass;
     7import org.junit.Rule;
    88import org.junit.Test;
    9 import org.openstreetmap.josm.JOSMFixture;
    109import org.openstreetmap.josm.Main;
    1110import org.openstreetmap.josm.data.osm.DataSet;
    1211import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    1312import org.openstreetmap.josm.gui.layer.markerlayer.PlayHeadMarker;
     13import org.openstreetmap.josm.testutils.JOSMTestRules;
     14
     15import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
    1416
    1517/**
     
    2123     * Setup test.
    2224     */
    23     @BeforeClass
    24     public static void setUp() {
    25         JOSMFixture.createUnitTestFixture().init(true);
    26     }
     25    @Rule
     26    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     27    public JOSMTestRules test = new JOSMTestRules().platform().commands();
    2728
    2829    /**
  • trunk/test/unit/org/openstreetmap/josm/actions/mapmode/SelectActionTest.java

    r10937 r10945  
    1212import java.util.Collection;
    1313
    14 import org.junit.BeforeClass;
     14import org.junit.Rule;
    1515import org.junit.Test;
    16 import org.openstreetmap.josm.JOSMFixture;
    1716import org.openstreetmap.josm.Main;
    1817import org.openstreetmap.josm.data.coor.EastNorth;
     
    2221import org.openstreetmap.josm.gui.MapFrame;
    2322import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     23import org.openstreetmap.josm.testutils.JOSMTestRules;
    2424import org.openstreetmap.josm.tools.Utils;
    2525
     
    5353     * Setup test.
    5454     */
    55     @BeforeClass
    56     public static void setUpBeforeClass() {
    57         JOSMFixture.createUnitTestFixture().init(true);
    58     }
     55    @Rule
     56    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
     57    public JOSMTestRules test = new JOSMTestRules().platform().projection().commands();
    5958
    6059    /**
Note: See TracChangeset for help on using the changeset viewer.