Search in sources :

Example 1 with DatabaseConfiguration

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

the class CodeGenerationConfigurationTest method prepareMvn.

private void prepareMvn() {
    importMavenProject(prj);
    DatabaseConfiguration cfg = dbRequirement.getConfiguration();
    HibernateToolsFactory.createConfigurationFile(cfg, prj, "hibernate.cfg.xml", true);
    HibernateToolsFactory.setHibernateVersion(prj, hbVersion);
}
Also used : DatabaseConfiguration(org.eclipse.reddeer.requirements.db.DatabaseConfiguration)

Example 2 with DatabaseConfiguration

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

the class ConnectionProfileTest method testConnectionProfile.

@Test
public void testConnectionProfile() {
    DatabaseConfiguration cfg = dbRequirement.getConfiguration();
    DriverDefinitionFactory.createDatabaseDriverDefinition(cfg);
    ConnectionProfileFactory.createConnectionProfile(cfg);
}
Also used : DatabaseConfiguration(org.eclipse.reddeer.requirements.db.DatabaseConfiguration) Test(org.junit.Test)

Example 3 with DatabaseConfiguration

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

the class ConnectionProfileTest method cleanUp.

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

Example 4 with DatabaseConfiguration

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

the class ConsoleConfigurationFileTest method createConfigFile.

private NewConfigurationWizard createConfigFile() {
    NewConfigurationWizard wizard = new NewConfigurationWizard();
    wizard.open();
    NewConfigurationFirstPage p1 = new NewConfigurationFirstPage(wizard);
    p1.setLocation(prjName, "src");
    wizard.next();
    DatabaseConfiguration cfg = dbRequirement.getConfiguration();
    NewConfigurationWizardPage p2 = new NewConfigurationWizardPage(wizard);
    p2.setHibernateVersion(hbVersion);
    p2.setConnectionURL(cfg.getJdbcString());
    p2.setUsername(cfg.getUsername());
    return wizard;
}
Also used : NewConfigurationFirstPage(org.jboss.tools.hibernate.reddeer.console.wizards.NewConfigurationFirstPage) NewConfigurationWizard(org.jboss.tools.hibernate.reddeer.console.wizards.NewConfigurationWizard) NewConfigurationWizardPage(org.jboss.tools.hibernate.reddeer.console.wizards.NewConfigurationWizardPage) DatabaseConfiguration(org.eclipse.reddeer.requirements.db.DatabaseConfiguration)

Example 5 with DatabaseConfiguration

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

the class ConsoleConfigurationTest method prepareConsoleConfigurationFile.

public void prepareConsoleConfigurationFile(String hibernateVersion) {
    DatabaseConfiguration cfg = dbRequirement.getConfiguration();
    NewConfigurationWizard wizard = new NewConfigurationWizard();
    wizard.open();
    NewConfigurationFirstPage p1 = new NewConfigurationFirstPage(wizard);
    p1.setLocation(prjName, "src");
    wizard.next();
    NewConfigurationWizardPage p2 = new NewConfigurationWizardPage(wizard);
    p2.setDatabaseDialect("H2");
    p2.setDriverClass(cfg.getDriverClass());
    p2.setConnectionURL(cfg.getJdbcString());
    p2.setUsername(cfg.getUsername());
    p2.setHibernateVersion(hibernateVersion);
    wizard.finish();
}
Also used : NewConfigurationFirstPage(org.jboss.tools.hibernate.reddeer.console.wizards.NewConfigurationFirstPage) NewConfigurationWizard(org.jboss.tools.hibernate.reddeer.console.wizards.NewConfigurationWizard) NewConfigurationWizardPage(org.jboss.tools.hibernate.reddeer.console.wizards.NewConfigurationWizardPage) DatabaseConfiguration(org.eclipse.reddeer.requirements.db.DatabaseConfiguration)

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