use of org.jboss.tools.hibernate.reddeer.jpt.ui.wizard.GenerateDdlWizard in project jbosstools-hibernate by jbosstools.
the class TablesFromJPAEntitiesGeneration method testDDLGeneration.
private void testDDLGeneration(boolean useConsole, String hbVersion, String pkg) {
ProjectExplorer pe = new ProjectExplorer();
pe.open();
pe.selectProjects(prj);
GenerateDdlWizard w = new GenerateDdlWizard();
w.open();
GenerateDdlWizardPage p = new GenerateDdlWizardPage(w);
p.setFileName(DDL_FILE);
p.setUseConsoleConfiguration(useConsole);
if (useConsole) {
assertTrue(p.isConsoleConfigurationEnabled());
assertFalse(p.isHibernateVersionEnabled());
p.setConsoleConfiguration(prj);
}
if (!useConsole) {
assertFalse(p.isConsoleConfigurationEnabled());
assertTrue(p.isHibernateVersionEnabled());
p.setHibernateVersion(hbVersion);
}
w.finish();
pe.open();
try {
ProjectUtils.getPackage(prj, DDL_FILE).open();
} catch (RedDeerException e) {
Assert.fail("DDL is not generated - known issues(s): JBIDE-19431,JBIDE-19535");
}
String ddlText = new TextEditor(DDL_FILE).getText();
assertTrue("DDL file cannot be empty", ddlText.length() > 0);
checkDDLContent(ddlText);
}
Aggregations