Changeset 7081 in josm for trunk/test/unit/org/openstreetmap/josm/actions
- Timestamp:
- 2014-05-09T04:49:54+02:00 (11 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/actions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/actions/CreateMultipolygonActionTest.groovy
r7068 r7081 1 1 package org.openstreetmap.josm.actions 2 2 3 import org.openstreetmap.josm.Main 4 import org.openstreetmap.josm.TestUtils; 3 import org.junit.BeforeClass 4 import org.junit.Test 5 import org.openstreetmap.josm.JOSMFixture 6 import org.openstreetmap.josm.TestUtils 5 7 import org.openstreetmap.josm.actions.search.SearchCompiler 6 8 import org.openstreetmap.josm.data.osm.Relation 7 9 import org.openstreetmap.josm.data.osm.Way 8 import org.openstreetmap.josm.data.projection.Projections9 10 import org.openstreetmap.josm.io.OsmReader 10 11 import org.openstreetmap.josm.tools.Utils 11 12 12 class CreateMultipolygonActionTest extends GroovyTestCase{13 class CreateMultipolygonActionTest { 13 14 14 @Override 15 void setUp() { 16 Main.initApplicationPreferences() 17 Main.setProjection(Projections.getProjectionByCode("EPSG:3857")); 15 @BeforeClass 16 public static void setUp() { 17 JOSMFixture.createUnitTestFixture().init(); 18 18 } 19 19 … … 26 26 } 27 27 28 void testCreate1() { 28 @Test 29 public void testCreate1() { 29 30 def ds = OsmReader.parseDataSet(new FileInputStream(TestUtils.getTestDataRoot() + "create_multipolygon.osm"), null); 30 31 def mp = CreateMultipolygonAction.createMultipolygonCommand(ds.getWays(), null) … … 33 34 } 34 35 35 void testCreate2() { 36 @Test 37 public void testCreate2() { 36 38 def ds = OsmReader.parseDataSet(new FileInputStream(TestUtils.getTestDataRoot() + "create_multipolygon.osm"), null); 37 39 def ways = Utils.filter(ds.getWays(), SearchCompiler.compile("ref=1 OR ref:1.1.", false, false)) … … 40 42 } 41 43 42 void testUpdate1() { 44 @Test 45 public void testUpdate1() { 43 46 def ds = OsmReader.parseDataSet(new FileInputStream(TestUtils.getTestDataRoot() + "create_multipolygon.osm"), null); 44 47 def ways = Utils.filter(ds.getWays(), SearchCompiler.compile("ref=\".*1\$\"", false, true)) … … 52 55 } 53 56 54 void testUpdate2() { 57 @Test 58 public void testUpdate2() { 55 59 def ds = OsmReader.parseDataSet(new FileInputStream(TestUtils.getTestDataRoot() + "create_multipolygon.osm"), null); 56 60 def ways = Utils.filter(ds.getWays(), SearchCompiler.compile("ref=1 OR ref:1.1.1", false, false)) -
trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java
r6881 r7081 4 4 import org.junit.Before; 5 5 import org.junit.Test; 6 import org.openstreetmap.josm. Main;6 import org.openstreetmap.josm.JOSMFixture; 7 7 import org.openstreetmap.josm.data.osm.Node; 8 8 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 15 15 @Before 16 16 public void setUp() { 17 Main.initApplicationPreferences();17 JOSMFixture.createUnitTestFixture().init(); 18 18 } 19 19
Note:
See TracChangeset
for help on using the changeset viewer.