use of org.jboss.tools.hibernate.reddeer.condition.EntityIsGenerated in project jbosstools-hibernate by jbosstools.
the class CodeGenerationConfigurationTest method checkGeneratedEntities.
private void checkGeneratedEntities(String src) {
PackageExplorerPart pe = new PackageExplorerPart();
pe.open();
try {
new WaitUntil(new EntityIsGenerated(prj, src, "org.gen", "Actor.java"));
pe.getProject(prj).getProjectItem(src, "org.gen", "Actor.java").open();
} catch (RedDeerException e) {
fail("Entities not generated, possible cause https://issues.jboss.org/browse/JBIDE-19217");
}
new DefaultEditor("Actor.java");
}
use of org.jboss.tools.hibernate.reddeer.condition.EntityIsGenerated 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");
}
use of org.jboss.tools.hibernate.reddeer.condition.EntityIsGenerated in project jbosstools-hibernate by jbosstools.
the class CodeGenerationKeyWordsTest method checkGeneratedEntities.
private void checkGeneratedEntities(String src) {
PackageExplorerPart pe = new PackageExplorerPart();
pe.open();
try {
new WaitUntil(new EntityIsGenerated(prj, src, "org.gen", "Actor.java"));
pe.getProject(prj).getProjectItem(src, "org.gen", "Actor.java").open();
} catch (RedDeerException e) {
fail("Entities not generated, possible cause https://issues.jboss.org/browse/JBIDE-19217");
}
TextEditor actorEditor = new TextEditor("Actor.java");
assertTrue(actorEditor.getText().contains("implements_"));
for (Marker m : actorEditor.getMarkers()) {
if (m.getType().equals("org.eclipse.jdt.ui.error")) {
fail("Actor has error markers");
}
}
}
Aggregations