@After public void tearDown() { Shell activeShell = new DefaultShell(); if (new DefaultShell().getText().equals(TestingWizard.TITLE)) { activeShell.close(); } }
@Test public void preferencesMenuTest() { log.info("Preferences menu test"); new DefaultShell(); Menu m = new ShellMenu("Window", "Preferences"); m.select(); Shell s = new DefaultShell("Preferences"); s.close(); }
@Test public void menuWithMnemonicTest() { log.info("menu with mnemonic test"); new DefaultShell(); Menu m = new ShellMenu("File", "New", "Other..."); m.select(); Shell s = new DefaultShell("New"); s.close(); }
@Test public void contextMenuTest() { ProjectExplorer pe = new ProjectExplorer(); pe.open(); Menu menu = new ContextMenu("New", "Project..."); menu.select(); Shell s = new DefaultShell("New Project"); s.close(); }
@Test public void aboutMenuTest() { log.info("About menu test"); new DefaultShell(); @SuppressWarnings("unchecked") Menu m = new ShellMenu( new WithMnemonicTextMatcher("Help"), new WithTextMatcher(new RegexMatcher("About.*"))); m.select(); Shell s = new DefaultShell(); s.close(); }