use of org.jboss.tools.hibernate.reddeer.console.views.KnownConfigurationsView 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.KnownConfigurationsView 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.KnownConfigurationsView 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.jboss.tools.hibernate.reddeer.console.views.KnownConfigurationsView in project jbosstools-hibernate by jbosstools.
the class HibernateRedDeerTest method deleteHibernateConfigurations.
private static void deleteHibernateConfigurations() {
KnownConfigurationsView v = new KnownConfigurationsView();
v.open();
while (v.getConsoleConfigurations() != null && !v.getConsoleConfigurations().isEmpty()) {
TreeItem i = v.getConsoleConfigurations().get(0);
i.select();
ContextMenuItem closeConfig = new ContextMenuItem("Close Configuration");
if (closeConfig.isEnabled()) {
closeConfig.select();
new WaitWhile(new JobIsRunning());
}
v.deleteConsoleConfiguration(i.getText());
}
}
use of org.jboss.tools.hibernate.reddeer.console.views.KnownConfigurationsView in project jbosstools-hibernate by jbosstools.
the class MappingDiagramTest method openMappingDiagram.
private void openMappingDiagram() {
KnownConfigurationsView v = new KnownConfigurationsView();
v.open();
v.selectConsole(prj);
ContextMenuItem mappingMenu = new ContextMenuItem("Mapping Diagram");
mappingMenu.select();
}
Aggregations