use of org.eclipse.reddeer.requirements.db.DatabaseConfiguration in project jbosstools-hibernate by jbosstools.
the class MappingDiagramTest method prepareMavenProject.
public void prepareMavenProject() {
importMavenProject(prj);
DatabaseConfiguration cfg = dbRequirement.getConfiguration();
DriverDefinitionFactory.createDatabaseDriverDefinition(cfg);
ConnectionProfileFactory.createConnectionProfile(cfg);
ProjectConfigurationFactory.setProjectFacetForDB(prj, cfg, jpaVersion);
KnownConfigurationsView v = new KnownConfigurationsView();
v.open();
EditConfigurationShell confShell = v.openConsoleConfiguration(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();
}
use of org.eclipse.reddeer.requirements.db.DatabaseConfiguration in project jbosstools-hibernate by jbosstools.
the class MappingDiagramTest method cleanUp.
@After
public void cleanUp() {
DatabaseConfiguration cfg = dbRequirement.getConfiguration();
ConnectionProfileFactory.deleteConnectionProfile(cfg.getProfileName());
deleteAllProjects();
}
use of org.eclipse.reddeer.requirements.db.DatabaseConfiguration in project jbosstools-hibernate by jbosstools.
the class TablesFromJPAEntitiesGeneration method prepareMavenProject.
private void prepareMavenProject() {
importMavenProject(prj);
DatabaseConfiguration cfg = dbRequirement.getConfiguration();
DriverDefinitionFactory.createDatabaseDriverDefinition(cfg);
ConnectionProfileFactory.createConnectionProfile(cfg);
ProjectConfigurationFactory.setProjectFacetForDB(prj, cfg, jpaVersion);
}
use of org.eclipse.reddeer.requirements.db.DatabaseConfiguration in project jbosstools-hibernate by jbosstools.
the class TablesFromJPAEntitiesGeneration method cleanUp.
@After
public void cleanUp() {
DatabaseConfiguration cfg = dbRequirement.getConfiguration();
ConnectionProfileFactory.deleteConnectionProfile(cfg.getProfileName());
deleteAllProjects();
}
use of org.eclipse.reddeer.requirements.db.DatabaseConfiguration 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));
}
Aggregations