Search in sources :

Example 21 with DatabaseConfiguration

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

the class JPADetailsViewTest method testConnectionProfile.

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

Example 22 with DatabaseConfiguration

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

the class JPADetailsViewTest 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 23 with DatabaseConfiguration

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

the class JPAEntityGenerationTest method testEntityGeneration.

private void testEntityGeneration(boolean useHibernateConsole) {
    prepare();
    DatabaseConfiguration cfg = dbRequirement.getConfiguration();
    EntityGenerationFactory.generateJPAEntities(cfg, prj, "org.gen", hbVersion, useHibernateConsole);
    PackageExplorerPart pe = new PackageExplorerPart();
    pe.open();
    try {
        new WaitUntil(new EntityIsGenerated(prj, "src/main/java", "org.gen", "Actor.java"));
        pe.getProject(prj).getProjectItem("src/main/java", "org.gen", "Actor.java").open();
    } catch (RedDeerException e) {
        e.printStackTrace();
        fail("Entities not generated, possible cause https://issues.jboss.org/browse/JBIDE-19175");
    }
    new DefaultEditor("Actor.java");
}
Also used : RedDeerException(org.eclipse.reddeer.common.exception.RedDeerException) EntityIsGenerated(org.jboss.tools.hibernate.reddeer.condition.EntityIsGenerated) DatabaseConfiguration(org.eclipse.reddeer.requirements.db.DatabaseConfiguration) PackageExplorerPart(org.eclipse.reddeer.eclipse.jdt.ui.packageview.PackageExplorerPart) WaitUntil(org.eclipse.reddeer.common.wait.WaitUntil) DefaultEditor(org.eclipse.reddeer.workbench.impl.editor.DefaultEditor)

Example 24 with DatabaseConfiguration

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

the class JPAFacetTest 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 25 with DatabaseConfiguration

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

the class JPAFacetTest method testConnectionProfile.

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

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