示例#1
0
  @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()));
  }
示例#2
0
  @Test
  public void next() {
    assertTrue("Next button should be enabled", wizardDialog.isNextEnabled());
    wizardDialog.next();

    CLabel label = new DefaultCLabel();
    assertThat(label.getText(), is("B"));
  }
示例#3
0
  @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));
  }
示例#5
0
  @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();
  }
示例#7
0
 @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));
 }
示例#8
0
 @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));
 }
示例#9
0
 @Test
 public void finish_notEnabled() {
   wizard.setFinishEnabled(false);
   assertFalse("Finish button should be disabled", wizardDialog.isFinishEnabled());
 }
示例#10
0
 @Test
 public void back_notEnabled() {
   assertFalse("Back button should be disabled", wizardDialog.isBackEnabled());
 }
示例#11
0
 @Test
 public void next_notEnabled() {
   wizardDialog.next();
   assertFalse("Next button should be disabled", wizardDialog.isNextEnabled());
 }