use of org.jboss.tools.hibernate.reddeer.console.views.QueryPageTabView in project jbosstools-hibernate by jbosstools.
the class HQLEditorTest method testHQLEditor.
@Test
public void testHQLEditor() {
prepare();
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();
v.open();
v.selectConsole(prj);
new ContextMenuItem("HQL Editor").select();
HQLEditor hqlEditor = new HQLEditor(prj);
hqlEditor.setText("from Actor");
hqlEditor.save();
hqlEditor.runHQLQuery();
QueryPageTabView result = new QueryPageTabView();
result.open();
assertTrue("Query result items expected", result.getResultItems().size() > 10);
}
use of org.jboss.tools.hibernate.reddeer.console.views.QueryPageTabView in project jbosstools-hibernate by jbosstools.
the class HibernateUIPartsTest method testHibernateViews.
/**
* Tests Hibernate perspective
* Tests Hibernate views
* - Hibernate Configurations
* - Hibernate Dynamic SQL Preview
* - Hibernate Query Result
* - Query Parameters
*/
@Test
public void testHibernateViews() {
checkView(new KnownConfigurationsView());
checkView(new DynamicSQLPreviewView());
checkView(new QueryPageTabView());
checkView(new QueryParametersView());
}
use of org.jboss.tools.hibernate.reddeer.console.views.QueryPageTabView in project jbosstools-hibernate by jbosstools.
the class CriteriaEditorTest method checkCriteriaEditor.
private void checkCriteriaEditor() {
KnownConfigurationsView v = new KnownConfigurationsView();
v.open();
v.selectConsole(prj);
new ContextMenuItem("Hibernate Criteria Editor").select();
CriteriaEditor criteriaEditor = new CriteriaEditor(prj);
criteriaEditor.setText("session.createCriteria(Actor.class).list();");
criteriaEditor.save();
criteriaEditor.runCriteria();
QueryPageTabView result = new QueryPageTabView();
result.open();
assertTrue("Query result items expected - known issue https://issues.jboss.org/browse/JBIDE-19743", result.getResultItems().size() > 10);
}
Aggregations