@Test public void finish() { assertTrue("Finish button should be enabled", wizardDialog.isFinishEnabled()); wizardDialog.finish(); Shell shell = new DefaultShell(); assertTrue(shell.getText().equals(new WorkbenchShell().getText())); }
@Test public void next() { assertTrue("Next button should be enabled", wizardDialog.isNextEnabled()); wizardDialog.next(); CLabel label = new DefaultCLabel(); assertThat(label.getText(), is("B")); }
@Test public void back() { wizardDialog.next(); assertTrue("Back button should be enabled", wizardDialog.isBackEnabled()); wizardDialog.back(); CLabel label = new DefaultCLabel(); assertThat(label.getText(), is("A")); }
@Before public void prepare() { newProject(PROJECT_NAME); ProjectExplorer pe = new ProjectExplorer(); pe.selectProjects(PROJECT_NAME); // this will set context for forge WizardDialog wd = getWizardDialog("ejb-setup", "(EJB: Setup).*"); new LabeledCombo("EJB Version:").setSelection(EJB_VERSION); wd.finish(TimePeriod.getCustom(600)); }
@Test public void cancel() { wizardDialog.cancel(); Shell shell = new DefaultShell(); assertTrue(shell.getText().equals(new WorkbenchShell().getText())); }
@Override public void processAdditionalWizardPages(WizardDialog dialog) { dialog.next(); dialog.next(); dialog.next(); new LabeledCombo("Type:") .setSelection( JBossPortletCapabilitiesWizardPageFillingTask.Type.RUNTIME_PROVIDER.toString()); dialog.next(); dialog.next(); new LabeledCombo("Database Type:").setSelection("HSQL"); new LabeledCombo("Connection profile:").setSelection(SWTTestExt.configuredState.getDB().name); dialog.next(); new LabeledCombo("Type:") .setSelection( JBossJSFPortletCapabilitiesWizardPageFillingTask.Type.RUNTIME_PROVIDER.toString()); processWizardPageJSFPortletCapabilities(); }
@Test public void getPageDescription() { final String currentPageDescription = wizardDialog.getPageDescription(); assertTrue( "Expected current page description is '" + TestingWizard.PAGE_DESCRIPTION + "'" + "\nbut current page description is '" + currentPageDescription + "'", TestingWizard.PAGE_DESCRIPTION.equals(currentPageDescription)); }
@Test public void getPageTitle() { final String currentPageTitle = wizardDialog.getPageTitle(); assertTrue( "Expected current page title is '" + TestingWizard.PAGE_TITLE + "'" + "\nbut current page title is '" + currentPageTitle + "'", TestingWizard.PAGE_TITLE.equals(currentPageTitle)); }
@Test public void finish_notEnabled() { wizard.setFinishEnabled(false); assertFalse("Finish button should be disabled", wizardDialog.isFinishEnabled()); }
@Test public void back_notEnabled() { assertFalse("Back button should be disabled", wizardDialog.isBackEnabled()); }
@Test public void next_notEnabled() { wizardDialog.next(); assertFalse("Next button should be disabled", wizardDialog.isNextEnabled()); }