source: josm/branch/0.5/test/functional/SegmentTest.java@ 3278

Last change on this file since 3278 was 298, checked in by imi, 17 years ago
  • added license description to head of each source file
File size: 673 bytes
Line 
1// License: GPL. Copyright 2007 by Immanuel Scholz and others
2import org.openstreetmap.josm.Main;
3
4import framework.FunctionalTestCase;
5
6
7public class SegmentTest extends FunctionalTestCase {
8
9 public void test() throws Exception {
10 key("ctrl-n", "n");
11 click(100,500);
12 click(200,500);
13 key("g");
14 drag(200,500,100,500);
15 assertEquals(1, Main.ds.segments.size());
16 key("s");
17 click(150,500);
18 assertEquals(1, Main.ds.getSelected().size());
19 assertEquals(Main.ds.segments.iterator().next(), Main.ds.getSelected().iterator().next());
20 key("d");
21 assertEquals(0, Main.ds.getSelected().size());
22 assertTrue(Main.ds.segments.iterator().next().deleted);
23 }
24}
Note: See TracBrowser for help on using the repository browser.