Search in sources :

Example 6 with DatabaseConfiguration

use of org.eclipse.reddeer.requirements.db.DatabaseConfiguration in project jbosstools-hibernate by jbosstools.

the class CriteriaEditorCodeAssistTest method prepareMaven.

private void prepareMaven() {
    prepareMvn(prj, hbVersion);
    DatabaseConfiguration cfg = dbRequirement.getConfiguration();
    ProjectConfigurationFactory.setProjectFacetForDB(prj, cfg, jpaVersion);
    KnownConfigurationsView v = new KnownConfigurationsView();
    v.open();
    List<TreeItem> confs = v.getConsoleConfigurations();
    if (confs != null) {
        for (TreeItem i : confs) {
            v.deleteConsoleConfiguration(i.getText());
        }
    }
    EditConfigurationShell confShell = v.addConfiguration();
    confShell.setName(prj);
    EditConfigurationMainPage mainPage = confShell.getMainPage();
    mainPage.setProject(prj);
    mainPage.setType("JPA (jdk 1.5+)");
    mainPage.setDatabaseConnection("[JPA Project Configured Connection]");
    mainPage.setHibernateVersion(hbVersion);
    confShell.ok();
}
Also used : DatabaseConfiguration(org.eclipse.reddeer.requirements.db.DatabaseConfiguration) TreeItem(org.eclipse.reddeer.swt.api.TreeItem) EditConfigurationShell(org.jboss.tools.hibernate.reddeer.console.EditConfigurationShell) EditConfigurationMainPage(org.jboss.tools.hibernate.reddeer.console.EditConfigurationMainPage) KnownConfigurationsView(org.jboss.tools.hibernate.reddeer.console.views.KnownConfigurationsView)

Example 7 with DatabaseConfiguration

use of org.eclipse.reddeer.requirements.db.DatabaseConfiguration in project jbosstools-hibernate by jbosstools.

the class CriteriaEditorTest method prepareMaven.

private void prepareMaven() {
    prepareMvn(prj, hbVersion);
    DatabaseConfiguration cfg = dbRequirement.getConfiguration();
    ProjectConfigurationFactory.setProjectFacetForDB(prj, cfg, jpaVersion);
    KnownConfigurationsView v = new KnownConfigurationsView();
    v.open();
    List<TreeItem> confs = v.getConsoleConfigurations();
    if (confs != null) {
        for (TreeItem i : confs) {
            v.deleteConsoleConfiguration(i.getText());
        }
    }
    EditConfigurationShell confShell = v.addConfiguration();
    confShell.setName(prj);
    EditConfigurationMainPage mainPage = confShell.getMainPage();
    mainPage.setProject(prj);
    mainPage.setType("JPA (jdk 1.5+)");
    mainPage.setDatabaseConnection("[JPA Project Configured Connection]");
    mainPage.setHibernateVersion(hbVersion);
    confShell.ok();
}
Also used : DatabaseConfiguration(org.eclipse.reddeer.requirements.db.DatabaseConfiguration) TreeItem(org.eclipse.reddeer.swt.api.TreeItem) EditConfigurationShell(org.jboss.tools.hibernate.reddeer.console.EditConfigurationShell) EditConfigurationMainPage(org.jboss.tools.hibernate.reddeer.console.EditConfigurationMainPage) KnownConfigurationsView(org.jboss.tools.hibernate.reddeer.console.views.KnownConfigurationsView)

Example 8 with DatabaseConfiguration

use of org.eclipse.reddeer.requirements.db.DatabaseConfiguration in project jbosstools-hibernate by jbosstools.

the class HQLEditorCodeAssistTest method cleanUp.

@After
public void cleanUp() {
    DatabaseConfiguration cfg = dbRequirement.getConfiguration();
    ConnectionProfileFactory.deleteConnectionProfile(cfg.getProfileName());
    deleteAllProjects();
}
Also used : DatabaseConfiguration(org.eclipse.reddeer.requirements.db.DatabaseConfiguration) After(org.junit.After)

Example 9 with DatabaseConfiguration

use of org.eclipse.reddeer.requirements.db.DatabaseConfiguration in project jbosstools-hibernate by jbosstools.

the class HQLEditorTest method prepare.

private void prepare() {
    importMavenProject(prj);
    DatabaseConfiguration cfg = dbRequirement.getConfiguration();
    DriverDefinitionFactory.createDatabaseDriverDefinition(cfg);
    ConnectionProfileFactory.createConnectionProfile(cfg);
    ProjectConfigurationFactory.setProjectFacetForDB(prj, cfg, jpaVersion);
}
Also used : DatabaseConfiguration(org.eclipse.reddeer.requirements.db.DatabaseConfiguration)

Example 10 with DatabaseConfiguration

use of org.eclipse.reddeer.requirements.db.DatabaseConfiguration in project jbosstools-hibernate by jbosstools.

the class HQLEditorTest method cleanUp.

@After
public void cleanUp() {
    DatabaseConfiguration cfg = dbRequirement.getConfiguration();
    ConnectionProfileFactory.deleteConnectionProfile(cfg.getProfileName());
    deleteAllProjects();
}
Also used : DatabaseConfiguration(org.eclipse.reddeer.requirements.db.DatabaseConfiguration) After(org.junit.After)

Aggregations

DatabaseConfiguration (org.eclipse.reddeer.requirements.db.DatabaseConfiguration)31 After (org.junit.After)9 NewConfigurationFirstPage (org.jboss.tools.hibernate.reddeer.console.wizards.NewConfigurationFirstPage)4 NewConfigurationWizard (org.jboss.tools.hibernate.reddeer.console.wizards.NewConfigurationWizard)4 NewConfigurationWizardPage (org.jboss.tools.hibernate.reddeer.console.wizards.NewConfigurationWizardPage)4 Before (org.junit.Before)4 Test (org.junit.Test)4 EditConfigurationMainPage (org.jboss.tools.hibernate.reddeer.console.EditConfigurationMainPage)3 EditConfigurationShell (org.jboss.tools.hibernate.reddeer.console.EditConfigurationShell)3 KnownConfigurationsView (org.jboss.tools.hibernate.reddeer.console.views.KnownConfigurationsView)3 TreeItem (org.eclipse.reddeer.swt.api.TreeItem)2 DefaultEditor (org.eclipse.reddeer.workbench.impl.editor.DefaultEditor)2 RedDeerException (org.eclipse.reddeer.common.exception.RedDeerException)1 WaitUntil (org.eclipse.reddeer.common.wait.WaitUntil)1 PackageExplorerPart (org.eclipse.reddeer.eclipse.jdt.ui.packageview.PackageExplorerPart)1 ProjectExplorer (org.eclipse.reddeer.eclipse.ui.navigator.resources.ProjectExplorer)1 EntityIsGenerated (org.jboss.tools.hibernate.reddeer.condition.EntityIsGenerated)1 SelectConnectionProfileDialog (org.jboss.tools.hibernate.reddeer.console.wizards.SelectConnectionProfileDialog)1 NewDSXMLWizard (org.jboss.tools.hibernate.reddeer.wizard.NewDSXMLWizard)1 WizardNewDSXMLFileCreationPage (org.jboss.tools.hibernate.reddeer.wizard.WizardNewDSXMLFileCreationPage)1