Changeset 32363 in osm for applications/editors


Ignore:
Timestamp:
2016-06-22T23:41:51+02:00 (8 years ago)
Author:
donvip
Message:

update unit tests

Location:
applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModelTest.groovy

    r30555 r32363  
    44
    55import org.openstreetmap.josm.gui.MainApplication;
    6 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
     6import org.openstreetmap.josm.gui.layer.OsmDataLayer
     7import org.openstreetmap.josm.testutils.JOSMTestRules;
     8
    79import javax.swing.DefaultListSelectionModel;
    810import org.openstreetmap.josm.data.osm.*;
     
    2123 */
    2224class JosmSelectionListModelTest extends GroovyTestCase {
    23         final shouldFail = new GroovyTestCase().&shouldFail
    24        
    25         @Before
    26         public void setUp() {
    27                 JOSMFixture.createUnitTestFixture().init()
    28         }
    29        
     25    final shouldFail = new GroovyTestCase().&shouldFail
     26
     27    @Rule
     28    public JOSMTestRules rules = new JOSMTestRules().preferences();
     29
    3030        @Test
    3131        public void test_Constructor(){
  • applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorModelUnitTest.groovy

    r30555 r32363  
    1414import org.openstreetmap.josm.data.coor.*
    1515import org.openstreetmap.josm.fixtures.JOSMFixture;
    16 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    17 
     16import org.openstreetmap.josm.gui.layer.OsmDataLayer
     17import org.openstreetmap.josm.testutils.JOSMTestRules;
    1818import org.openstreetmap.josm.JOSMFixture;
    1919
     
    2424class TurnRestrictionEditorModelUnitTest extends GroovyTestCase{
    2525
    26         final shouldFail = new GroovyTestCase().&shouldFail
    27        
     26    final shouldFail = new GroovyTestCase().&shouldFail
     27
     28    @Rule
     29    public JOSMTestRules rules = new JOSMTestRules().preferences();
     30
    2831        def navigationControlerMock = [
    2932       gotoBasicEditor:{},
     
    9699        @Before
    97100        public void setUp() {
    98                 JOSMFixture.createUnitTestFixture().init()
    99                        
    100101                ds = new DataSet()
    101102                layer = new OsmDataLayer(ds, "test", null)             
    102103                model = new TurnRestrictionEditorModel(layer, navigationControlerMock);
    103104        }
    104        
    105        
    106105       
    107106        /**
  • applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditorUnitTest.groovy

    r30555 r32363  
    44
    55import org.openstreetmap.josm.data.osm.DataSet;
    6 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    7 
     6import org.openstreetmap.josm.gui.layer.OsmDataLayer
     7import org.openstreetmap.josm.testutils.JOSMTestRules;
    88import org.openstreetmap.josm.JOSMFixture;
    99
     
    1515 */
    1616class TurnRestrictionLegEditorUnitTest extends GroovyTestCase {
    17         final shouldFail = new GroovyTestCase().&shouldFail
    18        
     17    final shouldFail = new GroovyTestCase().&shouldFail
     18
     19    @Rule
     20    public JOSMTestRules rules = new JOSMTestRules().preferences();
     21
    1922        def navigationControlerMock = [
    2023       gotoBasicEditor:{},
     
    2831        @Before
    2932        public void setUp() {
    30                 JOSMFixture.createUnitTestFixture().init()
    31                
    3233                ds = new DataSet()
    3334                layer = new OsmDataLayer(ds, "test", null)             
  • applications/editors/josm/plugins/turnrestrictions/test/unit/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionTypeRendererTest.groovy

    r30555 r32363  
    77
    88import java.awt.Component
    9 import org.openstreetmap.josm.JOSMFixture;
     9import org.openstreetmap.josm.JOSMFixture
     10import org.openstreetmap.josm.testutils.JOSMTestRules;;
    1011
    1112class TurnRestrictionTypeRendererTest extends GroovyTestCase{
    1213
    13         @Before
    14         public void setUp() {
    15                 JOSMFixture.createUnitTestFixture().init()                     
    16         }
    17        
     14    @Rule
     15    public JOSMTestRules rules = new JOSMTestRules().preferences();
     16
    1817        @Test
    1918        public void test_Constructor() {
Note: See TracChangeset for help on using the changeset viewer.