Changeset 23510 in osm for applications/editors/josm/plugins/turnrestrictions/test
- Timestamp:
- 2010-10-08T23:54:18+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/turnrestrictions/test
- Files:
-
- 11 added
- 5 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/turnrestrictions/test/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/JosmSelectionListModelTest.groovy
r20586 r23510 1 1 package org.openstreetmap.josm.plugins.turnrestrictions.editor; 2 import org.openstreetmap.josm.fixtures.JOSMFixture; 2 3 import groovy.util.GroovyTestCase; 4 3 5 import org.openstreetmap.josm.gui.MainApplication; 4 6 import org.openstreetmap.josm.gui.layer.OsmDataLayer; … … 7 9 import org.openstreetmap.josm.data.coor.*; 8 10 11 import org.openstreetmap.josm.plugins.turnrestrictions.fixtures.JOSMFixture; 12 9 13 import static org.junit.Assert.*; 10 14 import org.junit.*; 11 15 import javax.swing.JFrame; 12 16 17 import junit.framework.TestCase; 18 import junit.framework.TestResult; 19 13 20 /** 14 21 * Unit test for {@see JosmSelctionListModel} 15 22 */ 16 class JosmSelectionListModelTest { 23 class JosmSelectionListModelTest extends GroovyTestCase { 17 24 final shouldFail = new GroovyTestCase().&shouldFail 25 26 @Before 27 public void setUp() { 28 JOSMFixture.createUnitTestFixture().init() 29 } 18 30 19 31 @Test … … 62 74 model.setJOSMSelection(objects) 63 75 model.setSelected(objects[0..1]) 64 assert model.getSelected().asList() == objects[0..1] 76 assert model.getSelected().asList() as Set == objects[0..1] as Set 65 77 66 78 // set new selection which includes one object which is currently … … 90 102 // select two elements 91 103 selectionModel.setSelectionInterval(1,2) 92 assert model.getSelected().asList() == [model.getElementAt(1),model.getElementAt(2)]; 104 assert model.getSelected().asList() as Set == [model.getElementAt(1),model.getElementAt(2)] as Set; 93 105 } 94 106 -
applications/editors/josm/plugins/turnrestrictions/test/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionEditorModelUnitTest.groovy
r20606 r23510 1 1 package org.openstreetmap.josm.plugins.turnrestrictions.editor; 2 import groovy.util.GroovyTestCase; 2 3 3 4 import static org.junit.Assert.*; … … 12 13 import org.openstreetmap.josm.data.osm.DataSet 13 14 import org.openstreetmap.josm.data.coor.* 15 import org.openstreetmap.josm.fixtures.JOSMFixture; 14 16 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 15 17 18 import org.openstreetmap.josm.plugins.turnrestrictions.fixtures.JOSMFixture; 19 16 20 /** 17 * This is a unit test for {@ seeTurnRestrictionEditorModel}21 * This is a unit test for {@link TurnRestrictionEditorModel} 18 22 * 19 23 */ 20 class TurnRestrictionEditorModelUnitTest { 24 class TurnRestrictionEditorModelUnitTest extends GroovyTestCase{ 21 25 22 26 final shouldFail = new GroovyTestCase().&shouldFail … … 92 96 @Before 93 97 public void setUp() { 98 JOSMFixture.createUnitTestFixture().init() 99 94 100 ds = new DataSet() 95 101 layer = new OsmDataLayer(ds, "test", null) -
applications/editors/josm/plugins/turnrestrictions/test/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditorUnitTest.groovy
r20606 r23510 1 1 package org.openstreetmap.josm.plugins.turnrestrictions.editor; 2 3 import groovy.util.GroovyTestCase; 4 2 5 import org.openstreetmap.josm.data.osm.DataSet; 3 6 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 7 8 import org.openstreetmap.josm.plugins.turnrestrictions.fixtures.JOSMFixture; 4 9 5 10 import static org.junit.Assert.*; 6 11 import org.junit.*; 7 12 /** 8 * Unit test for the {@ seeTurnRestrictionLegEditor}13 * Unit test for the {@link TurnRestrictionLegEditor} 9 14 * 10 15 */ 11 class TurnRestrictionLegEditorUnitTest { 16 class TurnRestrictionLegEditorUnitTest extends GroovyTestCase { 12 17 final shouldFail = new GroovyTestCase().&shouldFail 13 18 … … 23 28 @Before 24 29 public void setUp() { 30 JOSMFixture.createUnitTestFixture().init() 31 25 32 ds = new DataSet() 26 33 layer = new OsmDataLayer(ds, "test", null) -
applications/editors/josm/plugins/turnrestrictions/test/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionTypeRendererTest.groovy
r20606 r23510 3 3 import static org.junit.Assert.*; 4 4 import org.junit.*; 5 6 import groovy.util.GroovyTestCase; 7 5 8 import java.awt.Component 9 import org.openstreetmap.josm.plugins.turnrestrictions.fixtures.JOSMFixture; 6 10 7 class TurnRestrictionTypeRendererTest { 11 class TurnRestrictionTypeRendererTest extends GroovyTestCase{ 8 12 13 @Before 14 public void setUp() { 15 JOSMFixture.createUnitTestFixture().init() 16 } 17 9 18 @Test 10 19 public void test_Constructor() { -
applications/editors/josm/plugins/turnrestrictions/test/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionTypeTest.groovy
r20606 r23510 1 1 package org.openstreetmap.josm.plugins.turnrestrictions.editor; 2 import groovy.util.GroovyTestCase; 2 3 3 4 import static org.junit.Assert.*; 4 5 import org.junit.* 5 class TurnRestrictionTypeTest { 6 class TurnRestrictionTypeTest extends GroovyTestCase{ 6 7 7 8 @Test … … 17 18 assert type == null 18 19 } 19 20 20 }
Note:
See TracChangeset
for help on using the changeset viewer.