Beispiel #1
0
 @Test
 public void setsMultipleSelection() throws Exception {
   bot.radio("SWT.MULTI").click();
   tree = bot.treeInGroup("Tree");
   tree.select(new String[] {"Node 2", "Node 4"});
   assertEquals(2, tree.selectionCount());
   TableCollection selection = tree.selection();
   assertEquals("Node 2", selection.get(0, 0));
   assertEquals("Node 4", selection.get(1, 0));
 }
Beispiel #2
0
 @Test
 public void setsSelection() throws Exception {
   tree.select(3);
   assertEquals(1, tree.selectionCount());
 }
Beispiel #3
0
 @Test
 public void getsSelectionCount() throws Exception {
   assertEquals(0, tree.selection().columnCount());
   assertEquals(0, tree.selection().rowCount());
   assertEquals(0, tree.selectionCount());
 }
Beispiel #4
0
 @Test
 public void unselectsSelection() throws Exception {
   tree.unselect();
   assertEquals(0, tree.selectionCount());
 }