Changeset 285 in josm
- Timestamp:
- 2007-07-11T21:41:12+02:00 (17 years ago)
- Location:
- test
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
test/functional/WayTest.java
r284 r285 7 7 8 8 public void test() throws Exception { 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 9 key("ctrl-n", "n"); 10 click(100,400); 11 click(150,400); 12 click(200,400); 13 key("g"); 14 drag(200,400,150,400); 15 drag(150,400,100,400); 16 key("s", "ctrl-a", "w"); 17 assertPopup(); 18 assertEquals(1, Main.ds.ways.size()); 19 20 key("ctrl-a", "s"); 21 click(125,400,"ctrl"); 22 key("w"); 23 assertPopup(); 24 assertEquals(2, Main.ds.ways.size()); 25 26 key("ctrl-z", "ctrl-z", "ctrl-shift-a"); 27 click(125,400); 28 assertEquals(1, Main.ds.ways.size()); 29 click(175,400); 30 assertEquals(1, Main.ds.ways.size()); 31 } 32 32 } -
test/functional/framework/FunctionalTestCase.java
r284 r285 25 25 26 26 import org.openstreetmap.josm.Main; 27 import org.openstreetmap.josm.data.Preferences; 28 import org.openstreetmap.josm.data.osm.DataSet; 27 29 import org.openstreetmap.josm.gui.MainApplication; 28 30 29 public class FunctionalTestCase extends JFCTestCase {31 abstract public class FunctionalTestCase extends JFCTestCase { 30 32 31 33 private KeyStroke getKey(String s) { … … 65 67 super.setUp(); 66 68 setHelper(new RobotTestHelper()); 69 70 Main.ds = new DataSet(); 71 Main.pref = new Preferences(); 72 if (Main.map != null) 73 Main.main.setMapFrame(null); 74 67 75 MainApplication.main(new String[]{}); 76 } 77 78 @Override protected void tearDown() throws Exception { 79 Main.parent.setVisible(false); 80 super.tearDown(); 68 81 } 69 82 -
test/unit/org/openstreetmap/josm/data/osm/visitor/MergeVisitorTest.java
r242 r285 350 350 assertEquals(23, ds.segments.iterator().next().id); 351 351 } 352 353 public void testDoNotMergeEqualObjectsWithDifferentNonZeroId() throws Exception {354 DataSet ds = new DataSet();355 Segment s1 = createSegment(ds, false, false, 23);356 Segment s2 = new Segment(s1);357 s2.id = 42;358 MergeVisitor v = new MergeVisitor(ds, null);359 v.visit(s2);360 assertEquals(2, ds.segments.size());361 }362 352 } -
test/unit/org/openstreetmap/josm/testframework/MotherObject.java
r271 r285 23 23 super.setUp(); 24 24 Main.proj = new Epsg4326(); 25 Main.ds = new DataSet(); 25 26 } 26 27
Note:
See TracChangeset
for help on using the changeset viewer.