use of org.eclipse.reddeer.requirements.db.DatabaseConfiguration in project jbosstools-hibernate by jbosstools.
the class JPAFacetTest method testSetJPAFacets.
@Test
public void testSetJPAFacets() {
DatabaseConfiguration cfg = dbRequirement.getConfiguration();
ProjectConfigurationFactory.setProjectFacetForDB(prj, cfg, jpaVersion);
}
use of org.eclipse.reddeer.requirements.db.DatabaseConfiguration in project jbosstools-hibernate by jbosstools.
the class CodeGenerationKeyWordsTest method prepareMvn.
private void prepareMvn() {
importMavenProject(prj);
DatabaseConfiguration cfg = dbRequirement.getConfiguration();
HibernateToolsFactory.createConfigurationFile(cfg, prj, "hibernate.cfg.xml", true);
HibernateToolsFactory.setHibernateVersion(prj, hbVersion);
}
use of org.eclipse.reddeer.requirements.db.DatabaseConfiguration in project jbosstools-hibernate by jbosstools.
the class ConsoleConfigurationFileTest method createConfigurationFileFromDatasource.
@Test
public void createConfigurationFileFromDatasource() {
// Create datasource
DatabaseConfiguration cfg = dbRequirement.getConfiguration();
DriverDefinitionFactory.createDatabaseDriverDefinition(cfg);
ConnectionProfileFactory.createConnectionProfile(cfg);
NewConfigurationWizard wizard = new NewConfigurationWizard();
wizard.open();
NewConfigurationFirstPage p1 = new NewConfigurationFirstPage(wizard);
p1.setLocation(prjName, "src");
wizard.next();
NewConfigurationWizardPage p2 = new NewConfigurationWizardPage(wizard);
SelectConnectionProfileDialog connectionDialog = p2.getValuesFromConnection();
connectionDialog.setProfileName(cfg.getProfileName());
connectionDialog.ok();
// Check values
p2.setHibernateVersion(hbVersion);
assertTrue("jdbc must match", p2.getConnectionURL().equals(cfg.getJdbcString()));
assertTrue("driver must match", p2.getDriveClass().equals(cfg.getDriverClass()));
assertTrue("username must match", p2.getUsername().equals(cfg.getUsername()));
wizard.finish();
checkFile(false);
}
use of org.eclipse.reddeer.requirements.db.DatabaseConfiguration in project jbosstools-hibernate by jbosstools.
the class HQLEditorCodeAssistTest method prepare.
private void prepare() {
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 AntFileExportTest method testConnectionProfile.
@Before
public void testConnectionProfile() {
DatabaseConfiguration cfg = dbRequirement.getConfiguration();
importProject(PRJ, null);
HibernateToolsFactory.createConfigurationFile(cfg, PRJ, "hibernate.cfg.xml", true);
}
Aggregations