Search in sources :

Example 1 with WizardNewDSXMLFileCreationPage

use of org.jboss.tools.hibernate.reddeer.wizard.WizardNewDSXMLFileCreationPage in project jbosstools-hibernate by jbosstools.

the class JBossDatasourceTest method jbossDatasourceTest.

@Test
public void jbossDatasourceTest() {
    DatabaseConfiguration cfg = dbRequirement.getConfiguration();
    NewDSXMLWizard wizard = new NewDSXMLWizard();
    wizard.open();
    WizardNewDSXMLFileCreationPage page = new WizardNewDSXMLFileCreationPage(wizard);
    page.setConnectionProfile(cfg.getProfileName());
    page.setParentFolder("/" + PRJ + "/src/main/resources");
    wizard.finish();
    String dsFileName = cfg.getProfileName() + "-ds.xml";
    assertFalse(new DefaultEditor(dsFileName).isDirty());
    ProjectExplorer pe = new ProjectExplorer();
    pe.open();
    assertTrue(pe.getProject(PRJ).containsResource("src", "main", "resources", dsFileName));
}
Also used : ProjectExplorer(org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer) DatabaseConfiguration(org.eclipse.reddeer.requirements.db.DatabaseConfiguration) NewDSXMLWizard(org.jboss.tools.hibernate.reddeer.wizard.NewDSXMLWizard) WizardNewDSXMLFileCreationPage(org.jboss.tools.hibernate.reddeer.wizard.WizardNewDSXMLFileCreationPage) DefaultEditor(org.eclipse.reddeer.workbench.impl.editor.DefaultEditor) Test(org.junit.Test)

Aggregations

ProjectExplorer (org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer)1 DatabaseConfiguration (org.eclipse.reddeer.requirements.db.DatabaseConfiguration)1 DefaultEditor (org.eclipse.reddeer.workbench.impl.editor.DefaultEditor)1 NewDSXMLWizard (org.jboss.tools.hibernate.reddeer.wizard.NewDSXMLWizard)1 WizardNewDSXMLFileCreationPage (org.jboss.tools.hibernate.reddeer.wizard.WizardNewDSXMLFileCreationPage)1 Test (org.junit.Test)1