Esempio n. 1
0
 @Test
 public void cannotFindANodeWithIncorrectNodeIndex() throws Exception {
   SWTBotTreeItem node = tree.expandNode("Node 2");
   try {
     node.getNode("Node 2.2", 1);
     fail("Was expecting an AssertionFailedException");
   } catch (AssertionFailedException e) {
     assertEquals(
         "assertion failed: The index (1) was more than the number of nodes (1) in the tree.",
         e.getMessage());
   }
 }
 public SWTBotGefEditPart addAssign(SWTBotGefEditPart toPart, String name) {
   appendActivity(toPart, "Assign", name);
   propsView.selectTab(1);
   SWTBot propsBot = propsView.bot();
   try {
     propsBot.list().select("? to ?");
     propsBot.button("Delete").click();
   } catch (AssertionFailedException e) {
     log.info(e.getMessage());
   }
   save();
   SWTBotGefEditPart assign = getEditPart(toPart, name);
   log.info("Added [part=" + assign + ", name=" + name + "]");
   return assign;
 }