[jbosstools-commits] JBoss Tools SVN: r39609 - in trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test: src/org/jboss/tools/hibernate/ui/bot and 1 other directories.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Mon Mar 19 07:16:29 EDT 2012


Author: jpeterka
Date: 2012-03-19 07:16:28 -0400 (Mon, 19 Mar 2012)
New Revision: 39609

Removed:
   trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/CodeGenerationLauncherTest.java
   trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConfigurationFileTest.java
   trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConsolePerspectiveTest.java
   trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConsoleTest.java
   trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/CriteriaEditorsTest.java
   trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/DaliTest.java
   trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/MappingFileTest.java
   trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/MappingsDiagramTest.java
   trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ReverseEngineerFileTest.java
   trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/StaticTest.java
   trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ViewsTest.java
   trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/
Modified:
   trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/META-INF/MANIFEST.MF
Log:
Obsolete hb tests versions cleanup

Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/META-INF/MANIFEST.MF	2012-03-19 10:21:34 UTC (rev 39608)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/META-INF/MANIFEST.MF	2012-03-19 11:16:28 UTC (rev 39609)
@@ -25,4 +25,3 @@
 Bundle-RequiredExecutionEnvironment: J2SE-1.5
 Eclipse-RegisterBuddy: org.apache.log4j
 Import-Package: org.eclipse.jdt.internal.ui
-Export-Package: org.jboss.tools.hibernate.ui.bot.testsuite

Deleted: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/CodeGenerationLauncherTest.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/CodeGenerationLauncherTest.java	2012-03-19 10:21:34 UTC (rev 39608)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/CodeGenerationLauncherTest.java	2012-03-19 11:16:28 UTC (rev 39609)
@@ -1,189 +0,0 @@
- /*******************************************************************************
-  * Copyright (c) 2007-2009 Red Hat, Inc.
-  * Distributed under license by Red Hat, Inc. All rights reserved.
-  * This program is made available under the terms of the
-  * Eclipse Public License v1.0 which accompanies this distribution,
-  * and is available at http://www.eclipse.org/legal/epl-v10.html
-  *
-  * Contributor:
-  *     Red Hat, Inc. - initial API and implementation
-  ******************************************************************************/
-package org.jboss.tools.hibernate.ui.bot.testcase;
-
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swtbot.eclipse.finder.matchers.WidgetMatcherFactory;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.hamcrest.Matcher;
-import org.jboss.tools.hibernate.ui.bot.test.util.DataHolder;
-import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
-import org.jboss.tools.hibernate.ui.bot.testsuite.Project;
-import org.jboss.tools.ui.bot.ext.config.Annotations.DB;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.gen.ActionItem;
-import org.jboss.tools.ui.bot.ext.types.IDELabel;
-import org.jboss.tools.ui.bot.ext.types.PerspectiveType;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
- at Require( db=@DB, perspective="Hibernate")
-public class CodeGenerationLauncherTest extends HibernateTest {
-
-	SWTBotShell mainShell = null;
-	public static boolean generationDone = false;
-	
-	@BeforeClass
-	/**
-	 * Setup prerequisites for this test
-	 */
-	public static void setUpTest() {
-
-		eclipse.maximizeActiveShell();
-		eclipse.closeView(IDELabel.View.WELCOME);
-		
-		prepareProject();
-		ConsoleTest consoleTest = new ConsoleTest();
-		consoleTest.createConsole();
-
-		util.waitForNonIgnoredJobs();
-	}
-	
-	/**
-	 * Run code generation code
-	 */
-	@Test
-	public void generate() {
-		if (generationDone) return;
-		
-		log.info("HB Code Generation STARTED");
-		log.info("Active Shell: " + bot.activeShell().getText());
-		
-		eclipse.openPerspective(PerspectiveType.HIBERNATE);
-				
-		createNewHibernateCodeGenerationConfiguration();
-		
-		fillMainTab();		
-		fillExportersTab();
-		fillRefreshTab();
-		fillCommonTab();		
-				
-		bot.button(IDELabel.Button.RUN).click();	
-		log.info("HB Code Generation FINISHED");
-		util.waitForNonIgnoredJobs();
-		
-		log.info("Active Shell: " + bot.activeShell().getText());
-		
-		checkGeneratedFiles();
-				
-		generationDone = true;			
-	}
-	/**
-	 * Checks existence generated files after code generation 
-	 */
-	private void checkGeneratedFiles() {
-	
-		log.info("Active Shell: " + bot.activeShell().getText());
-		SWTBotShell[] shells = bot.shells();
-		for (SWTBotShell shell : shells) {
-			log.info("Possible shell: " + shell.getText());
-		}
-					 
-		open.viewOpen(ActionItem.View.JavaPackageExplorer.LABEL);					
-
-		
-		for (String table : DataHolder.tables) {
-			String className = table.substring(0,1).toUpperCase() + table.substring(1).toLowerCase();
-			packageExplorer.openFile(Project.PROJECT_NAME,"gen","org","test", className + ".java"); 
-		}
-
-		log.info("Generated files check DONE");
-	}
-
-	/**
-	 * 
-	 */
-	private void createNewHibernateCodeGenerationConfiguration() {
-		SWTBotMenu menu = null;
-		menu = bot.menu("Run");
-		menu = menu.menu(IDELabel.Menu.HIBERNATE_CODE_GENERATION);
-		menu = menu.menu(IDELabel.Menu.HIBERNATE_CODE_GENERATION_CONF).click();
-		
-		mainShell = bot.activeShell();
-	}
-
-	/**
-	 * TC 09
-	 */
-	public void fillMainTab() {		
-		
-		bot.tree().expandNode("Hibernate Code Generation").select();
-		bot.toolbarButtonWithTooltip("New launch configuration").click();
-		
-		eclipse.selectTreeLocation("Hibernate Code Generation","New_configuration");
-		bot.textWithLabel("Name:").setText("HSQL Configuration");
-		
-		// Console Configuration
-		bot.comboBoxWithLabel("Console configuration:").setSelection(Project.PROJECT_NAME);
-		
-		// Output directory
-		bot.button("Browse...").click();
-		bot.shell("Select output directory").activate();
-		eclipse.selectTreeLocation(Project.PROJECT_NAME);
-		bot.button("Create New Folder...").click();
-		bot.shell("New Folder").activate();
-		bot.textWithLabel("Folder name:").setText("gen");
-		bot.button(IDELabel.Button.OK).click();
-		eclipse.selectTreeLocation(Project.PROJECT_NAME,"gen");
-		bot.button(IDELabel.Button.OK).click();
-		
-		// Create console configuration
-		Matcher<Button> matcher = WidgetMatcherFactory.withText("Reverse engineer from JDBC Connection");
-		Button button = bot.widget(matcher);		
-		SWTBotCheckBox cb = new SWTBotCheckBox(button); 
-				
-		if (!cb.isChecked())
-			cb.click();
-		
-		bot.textWithLabel("Package:").setText("org.test");
-		log.info("HB Code Generation Main tab DONE");
-		bot.sleep(TIME_1S);
-	}
-
-	/**
-	 * TC 10
-	 */
-	public void fillExportersTab() {
-		mainShell.activate();
-		bot.cTabItem(IDELabel.HBLaunchConfigurationDialog.EXPORTERS_TAB).activate();
-		bot.table().select("Domain code (.java)");
-		bot.table().getTableItem(0).check();
-		log.info("HB Code Generation Exporters tab DONE");
-		bot.sleep(TIME_1S);
-	}
-
-	/**
-	 * TC 11
-	 */
-	public void fillRefreshTab() {
-		mainShell.activate();
-		bot.cTabItem(IDELabel.HBLaunchConfigurationDialog.REFRESH_TAB).activate();
-		log.info("HB Code Generation Refresh tab DONE");
-		bot.sleep(TIME_1S);
-	}
-
-	/**
-	 * TC 12
-	 */
-	public void fillCommonTab() {
-		mainShell.activate();
-		bot.cTabItem(IDELabel.HBLaunchConfigurationDialog.COMMON_TAB).activate();
-		log.info("HB Code Generation Common tab DONE");
-		bot.sleep(TIME_1S);
-	}
-	
-	@AfterClass
-	public static void clean() {
-	}	
-}

Deleted: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConfigurationFileTest.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConfigurationFileTest.java	2012-03-19 10:21:34 UTC (rev 39608)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConfigurationFileTest.java	2012-03-19 11:16:28 UTC (rev 39609)
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2009 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributor:
- *     Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.ui.bot.testcase;
-
-import java.io.IOException;
-import java.util.List;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.xpath.XPathExpressionException;
-
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swtbot.eclipse.finder.matchers.WidgetMatcherFactory;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
-import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.hamcrest.Matcher;
-import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
-import org.jboss.tools.hibernate.ui.bot.testsuite.Project;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
-import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
-import org.jboss.tools.ui.bot.ext.helper.DatabaseHelper;
-import org.jboss.tools.ui.bot.ext.parts.ObjectMultiPageEditorBot;
-import org.jboss.tools.ui.bot.ext.types.EntityType;
-import org.jboss.tools.ui.bot.ext.types.IDELabel;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.xml.sax.SAXException;
-
- at Require(clearProjects = false,  perspective="Hibernate")
-public class ConfigurationFileTest extends HibernateTest {
-
-	@BeforeClass
-	public static void setUpTest() {
-		HibernateTest.prepareProject();
-	}
-
-	@AfterClass
-	public static void tearDownTest() {
-		HibernateTest.clean();
-	}
-
-	/**
-	 * TC 02 - Create Hibernate Configuration file with predefined variables
-	 */
-	@Test
-	public void createFile() {
-		eclipse.createNew(EntityType.HIBERNATE_CONFIGURATION_FILE);
-
-		eclipse.selectTreeLocation(Project.PROJECT_NAME, "src");
-		bot.textWithLabel(IDELabel.HBConfigurationWizard.FILE_NAME).setText(
-				Project.CONF_FILE_NAME2);
-		bot.button(IDELabel.Button.NEXT).click();
-
-		// Create new configuration file
-		String dialect = DatabaseHelper.getDialect(TestConfigurator.currentConfig.getDB().dbType);
-		bot.comboBoxWithLabel(IDELabel.HBConsoleWizard.DATABASE_DIALECT).setSelection(dialect);
-		String drvClass = DatabaseHelper.getDriverClass(TestConfigurator.currentConfig.getDB().dbType);
-		bot.comboBoxWithLabel(IDELabel.HBConsoleWizard.DRIVER_CLASS).setSelection(drvClass);		
-		String jdbc = TestConfigurator.currentConfig.getDB().jdbcString;
-		bot.comboBoxWithLabel(IDELabel.HBConsoleWizard.CONNECTION_URL).setText(jdbc);
-		
-		// Create console configuration
-		Matcher<Button> matcher = WidgetMatcherFactory
-				.withText(IDELabel.HBConsoleWizard.CREATE_CONSOLE_CONFIGURATION);
-		Button button = bot.widget(matcher);
-		SWTBotCheckBox cb = new SWTBotCheckBox(button);
-
-		if (!cb.isChecked())
-			cb.click();
-
-		SWTBotShell shell = bot.activeShell();
-		log.info("Active shell:" + shell.getText());
-		bot.button(IDELabel.Button.FINISH).click();
-		eclipse.waitForClosedShell(shell);
-		log.info("Active Shell: " + bot.activeShell().getText());
-	}
-
-	/**
-	 * TC 13
-	 * 
-	 * @throws ParserConfigurationException
-	 * @throws IOException
-	 * @throws SAXException
-	 * @throws XPathExpressionException
-	 */
-	@Test
-	/*
-	 * Edit Configuration file testcase. It checks: 1. Configuration file editor
-	 * tabs availability,...
-	 */
-	public void editFile() throws ParserConfigurationException, SAXException,
-			IOException, XPathExpressionException {
-
-		SWTBotEditor editor = eclipse.openFile(Project.PROJECT_NAME, "src",
-				Project.CONF_FILE_NAME2);
-		ObjectMultiPageEditorBot multiBot = new ObjectMultiPageEditorBot(
-				Project.CONF_FILE_NAME2);
-
-		// 1. Tabs availability
-		String[] pages = { "Session Factory", "Security", "Source" };
-		for (String page : pages) {
-			multiBot.selectPage(page);
-			bot.sleep(TIME_500MS);
-		}
-
-		// 2. Test creating elements and properties
-		// TODO creating element impl.
-
-		// 3. Create new security element
-		SWTBot localBot = editor.bot();
-		multiBot.selectPage(pages[1]);
-		SWTBotTree secTree = localBot.tree().select("Security");
-
-		ContextMenuHelper.clickContextMenu(secTree, "New", "Grant...");
-
-		// Fillin Role, Entity-Name and Check action All *
-		String roleName = "role1";
-		String entityName = "entity1";
-
-		bot.textWithLabel("Role:*").setText("role1");
-		bot.textWithLabel("Entity-Name:*").setText("entity1");
-		SWTBotShell shell = bot.shell("Add Grant");
-
-		assertNotNull(shell);
-		SWTBot shellBot = new SWTBot(shell.widget);
-
-		SWTBotTree tree = shellBot.tree();
-		SWTBotTreeItem[] items = tree.getAllItems();
-		items[0].check();
-
-		shellBot.button(IDELabel.Button.FINISH).click();
-
-		// Click on Source tab for check
-		multiBot.selectPage(pages[2]);
-		List<String> lines = editor.toTextEditor().getLines();
-
-		// XMLPath
-		/*
-		 * // Convert editor text into InputStreamReader StringBuilder builder =
-		 * new StringBuilder(); for (String line : lines ) {
-		 * builder.append(line); builder.append("\n"); } ByteArrayInputStream bs
-		 * = new ByteArrayInputStream(builder.toString().getBytes());
-		 * 
-		 * DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-		 * dbf.setNamespaceAware(true); DocumentBuilder db; db =
-		 * dbf.newDocumentBuilder(); Document doc = db.parse(bs); XPath xpath =
-		 * XPathFactory.newInstance().newXPath(); XPathExpression expr =
-		 * xpath.compile("/person/security/grant"); Object result =
-		 * expr.evaluate(doc, XPathConstants.NODESET); NodeList nodes =
-		 * (NodeList) result; for ( int i = 0; i < nodes.getLength(); i++ )
-		 * System.out.println(nodes.item(i).getNodeValue());
-		 */
-		// Search for security grant
-
-		boolean found = false;
-		String wanted = "<grant actions=\"*\" entity-name=\"" + entityName
-				+ "\" role=\"" + roleName + "\"/>";
-		System.out.println("Looking for:" + wanted);
-
-		for (String line : lines) {
-			System.out.println(line);
-			if (line.trim().equals(wanted)) {
-				found = true;
-				System.out.println("Found");
-			}
-		}
-
-		editor.saveAndClose();
-		assertTrue("Security element not found in xml", found);
-	}
-
-}

Deleted: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConsolePerspectiveTest.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConsolePerspectiveTest.java	2012-03-19 10:21:34 UTC (rev 39608)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConsolePerspectiveTest.java	2012-03-19 11:16:28 UTC (rev 39609)
@@ -1,39 +0,0 @@
- /*******************************************************************************
-  * Copyright (c) 2007-2009 Red Hat, Inc.
-  * Distributed under license by Red Hat, Inc. All rights reserved.
-  * This program is made available under the terms of the
-  * Eclipse Public License v1.0 which accompanies this distribution,
-  * and is available at http://www.eclipse.org/legal/epl-v10.html
-  *
-  * Contributor:
-  *     Red Hat, Inc. - initial API and implementation
-  ******************************************************************************/
-package org.jboss.tools.hibernate.ui.bot.testcase;
-
-import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.gen.ActionItem;
-import org.jboss.tools.ui.bot.ext.types.IDELabel;
-import org.junit.Test;
-
- at Require(clearProjects = false,  perspective="Hibernate")
-public class ConsolePerspectiveTest extends HibernateTest {
-
-	/**
-	 * TC 17 - Check presence of basic hibernate views
-	 */
-	@Test
-	public void openPerspectiveElements() {
-		eclipse.closeView(IDELabel.View.WELCOME);
-		
-		open.perspective(ActionItem.Perspective.HIBERNATE.LABEL);
-		bot.sleep(TIME_1S);
-		
-		open.viewOpen(ActionItem.View.HibernateHibernateConfigurations.LABEL);
-		bot.sleep(TIME_1S);
-		open.viewOpen(ActionItem.View.HibernateHibernateDynamicSQLPreview.LABEL);
-		bot.sleep(TIME_1S);
-		open.viewOpen(ActionItem.View.HibernateHibernateQueryResult.LABEL);
-		bot.sleep(TIME_1S);
-	}
-}

Deleted: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConsoleTest.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConsoleTest.java	2012-03-19 10:21:34 UTC (rev 39608)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConsoleTest.java	2012-03-19 11:16:28 UTC (rev 39609)
@@ -1,244 +0,0 @@
- /*******************************************************************************
-  * Copyright (c) 2007-2009 Red Hat, Inc.
-  * Distributed under license by Red Hat, Inc. All rights reserved.
-  * This program is made available under the terms of the
-  * Eclipse Public License v1.0 which accompanies this distribution,
-  * and is available at http://www.eclipse.org/legal/epl-v10.html
-  *
-  * Contributor:
-  *     Red Hat, Inc. - initial API and implementation
-  ******************************************************************************/
-package org.jboss.tools.hibernate.ui.bot.testcase;
-
-import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.hibernate.helper.ConsoleHelper;
-import org.jboss.tools.hibernate.ui.bot.test.util.DataHolder;
-import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
-import org.jboss.tools.hibernate.ui.bot.testsuite.Project;
-import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
-import org.jboss.tools.ui.bot.ext.config.Annotations.DB;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
-import org.jboss.tools.ui.bot.ext.gen.ActionItem;
-import org.jboss.tools.ui.bot.ext.helper.DatabaseHelper;
-import org.jboss.tools.ui.bot.ext.types.EntityType;
-import org.jboss.tools.ui.bot.ext.types.IDELabel;
-import org.jboss.tools.ui.bot.ext.types.ViewType;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
- at Require( clearProjects = false,  db=@DB, perspective="Hibernate")
-public class ConsoleTest extends HibernateTest {
-
-	@BeforeClass	
-	public static void setUpTest() {
-		HibernateTest.prepareProject();
-	}
-	
-	@AfterClass
-	public static void tearDownTest() { 
-		HibernateTest.clean();
-		bot.sleep(TIME_5S);
-	}	
-	
-	private SWTBotShell mainShell;
-	private static boolean consoleCreated = false;
-	
-	/**
-	 * Create console TestCases TC03 - TC16
-	 */
-	@Test
-	public void createConsole() {
-		if (ConsoleHelper.consoleExists(Project.PROJECT_NAME)) return;
-		
-		log.info("HB Console creation STARTED");
-		
-		eclipse.showView(ViewType.PACKAGE_EXPLORER);
-		packageExplorer.selectProject(Project.PROJECT_NAME);
-		eclipse.createNew(EntityType.HIBERNATE_CONSOLE);		
-				
-		createMainTab();
-		mainShell.activate();
-		createOptionTab();
-		createClasspathTab();
-		createMappingsTab();
-		createCommonTab();
-		
-		bot.button(IDELabel.Button.FINISH).click();
-		util.waitForNonIgnoredJobs();
-		
-		expandDatabaseInConsole();
-		
-		log.info("HB Console creation FINISHED");
-		
-		consoleCreated = true;
-	}
-	
-	/**
-	 * TC 03
-	 */
-	private void createMainTab() {
-		bot.cTabItem(IDELabel.HBConsoleWizard.MAIN_TAB).activate();
-		bot.textWithLabelInGroup("",IDELabel.HBConsoleWizard.PROJECT_GROUP ).setText(Project.PROJECT_NAME);
-		mainShell =  bot.activeShell();
-			
-		// Create new configuration file
-		bot.buttonInGroup(IDELabel.HBConsoleWizard.SETUP_BUTTON,IDELabel.HBConsoleWizard.CONFIGURATION_FILE_GROUP).click();
-		bot.button(IDELabel.HBConsoleWizard.CREATE_NEW_BUTTON).click();
-		eclipse.selectTreeLocation(Project.PROJECT_NAME, "src");
-		bot.button(IDELabel.Button.NEXT).click();
-		
-		// Dialect, driver, jdbc
-		String dialect = DatabaseHelper.getDialect(TestConfigurator.currentConfig.getDB().dbType);
-		bot.comboBoxWithLabel(IDELabel.HBConsoleWizard.DATABASE_DIALECT).setSelection(dialect);
-		String drvClass = DatabaseHelper.getDriverClass(TestConfigurator.currentConfig.getDB().dbType);
-		bot.comboBoxWithLabel(IDELabel.HBConsoleWizard.DRIVER_CLASS).setSelection(drvClass);		
-		String jdbc = TestConfigurator.currentConfig.getDB().jdbcString;
-		bot.comboBoxWithLabel(IDELabel.HBConsoleWizard.CONNECTION_URL).setText(jdbc);
-		
-		// Username, password
-		String username = TestConfigurator.currentConfig.getDB().username;
-		bot.textWithLabel("Username:").setText(username);		
-		String password = TestConfigurator.currentConfig.getDB().password;
-		bot.textWithLabel("Password:").setText(password);
-				
-		SWTBotShell shell = bot.activeShell();
-		bot.button(IDELabel.Button.FINISH).click();
-		eclipse.waitForClosedShell(shell);
-			
-		log.info("HB Console Main tab DONE");		
-		bot.sleep(TIME_1S);
-	}
-
-	/**
-	 * TC 04
-	 */
-	private void createOptionTab() {
-		mainShell.activate();
-		bot.cTabItem(IDELabel.HBConsoleWizard.OPTIONS_TAB).activate();
-				
-		String dialect = DatabaseHelper.getDialect(TestConfigurator.currentConfig.getDB().dbType);
-		bot.comboBoxWithLabelInGroup("", IDELabel.HBConsoleWizard.DATABASE_DIALECT).setSelection(dialect);
-		log.info("HB Console Option tab DONE");
-		bot.sleep(TIME_1S);
-	}
-
-	/**
-	 * TC 05
-	 */
-	private void createClasspathTab() {
-		mainShell.activate();
-		bot.cTabItem(IDELabel.HBConsoleWizard.CLASSPATH_TAB).activate();
-		log.info("HB Console ClassPath tab DONE");
-		bot.sleep(TIME_1S);
-	}
-
-	/**
-	 * TC 06
-	 */
-	private void createMappingsTab() {
-		mainShell.activate();
-		bot.cTabItem(IDELabel.HBConsoleWizard.MAPPINGS_TAB).activate();
-		log.info("HB Console Mappings tab DONE");
-		bot.sleep(TIME_1S);
-	}
-
-	/**
-	 * TC 07
-	 */
-	private void createCommonTab() {
-		mainShell.activate();
-		bot.cTabItem(IDELabel.HBConsoleWizard.COMMON_TAB).activate();
-		log.info("HB Console Common tab DONE");
-		bot.sleep(TIME_1S);
-	}
-
-
-	private void expandDatabaseInConsole() {
-		SWTBot viewBot = open.viewOpen(ActionItem.View.HibernateHibernateConfigurations.LABEL).bot();
-		SWTBotTreeItem console = viewBot.tree().expandNode(Project.PROJECT_NAME);
-		bot.sleep(TIME_1S);	
-		// Workaround cause node can't be expanded
-		SWTBotTreeItem db = console.expandNode("Database").select();
-		bot.sleep(TIME_1S);
-		db.contextMenu("Refresh").click();		
-		bot.sleep(TIME_1S);
-		db.expand();
-
-		SWTBotTreeItem pub = db.getItems()[0];
-		pub.select();	
-		bot.sleep(TIME_500MS);
-		
-		pub.doubleClick();
-		bot.sleep(TIME_500MS);	
-		DataHolder.tables = pub.getNodes();	
-	}
-	
-	/**
-	 * TC 16 - open console, change several values, apply changes and check changes if they were store correctly
-	 */
-	@Test	
-	public void editConsole() {
-		// prereq
-		createConsole();
-		
-		// open console
-		openConsoleConfiguration();		
-		editConsoleValues();
-		closeConsole();
-		
-		// open console again
-		openConsoleConfiguration();
-		checkConsoleValues();
-		closeConsole();
-	}
-	
-	private void closeConsole() {
-		bot.clickButton(IDELabel.Button.OK);
-	}
-	
-	private void editConsoleValues() {
-		// perform change on
-		// - Main page
-		bot.cTabItem(IDELabel.HBConsoleWizard.MAIN_TAB).activate();
-		bot.radioInGroup("Type:",1).click();
-		bot.sleep(TIME_1S);
-		// - Option
-		bot.cTabItem(IDELabel.HBConsoleWizard.OPTIONS_TAB).activate();
-		bot.comboBoxInGroup("Database dialect:").setSelection("MySQL");
-		bot.sleep(TIME_1S);
-		// - Classpath
-		bot.cTabItem(IDELabel.HBConsoleWizard.CLASSPATH_TAB).activate();		
-		bot.sleep(TIME_1S);
-		// - Mapping
-		bot.cTabItem(IDELabel.HBConsoleWizard.MAPPINGS_TAB).activate();
-		bot.sleep(TIME_1S);
-		// - Common
-		bot.cTabItem(IDELabel.HBConsoleWizard.COMMON_TAB).activate();
-		bot.sleep(TIME_1S);		
-		// apply
-		bot.clickButton(IDELabel.Button.APPLY);
-	}
-	
-	private void checkConsoleValues() {
-		// perform change on
-		// - Main page
-		bot.cTabItem(IDELabel.HBConsoleWizard.MAIN_TAB).activate();
-		assertTrue(bot.radioInGroup("Type:",1).isSelected());	
-		// - Option
-		bot.cTabItem(IDELabel.HBConsoleWizard.OPTIONS_TAB).activate();
-		assertEquals("MySQL", bot.comboBoxInGroup("Database dialect:").getText());		
-		log.info("Changed console value checked");
-	}
-	
-	private void openConsoleConfiguration() {
-		SWTBot viewBot = open.viewOpen(ActionItem.View.HibernateHibernateConfigurations.LABEL).bot();
-		SWTBotTreeItem item = SWTEclipseExt.selectTreeLocation(viewBot, Project.PROJECT_NAME);
-		item.doubleClick();		
-	}
-
-	
-}

Deleted: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/CriteriaEditorsTest.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/CriteriaEditorsTest.java	2012-03-19 10:21:34 UTC (rev 39608)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/CriteriaEditorsTest.java	2012-03-19 11:16:28 UTC (rev 39609)
@@ -1,36 +0,0 @@
- /*******************************************************************************
-  * Copyright (c) 2007-2009 Red Hat, Inc.
-  * Distributed under license by Red Hat, Inc. All rights reserved.
-  * This program is made available under the terms of the
-  * Eclipse Public License v1.0 which accompanies this distribution,
-  * and is available at http://www.eclipse.org/legal/epl-v10.html
-  *
-  * Contributor:
-  *     Red Hat, Inc. - initial API and implementation
-  ******************************************************************************/
-package org.jboss.tools.hibernate.ui.bot.testcase;
-
-import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.junit.Test;
-
- at Require(clearProjects = false, perspective="Hibernate")
-public class CriteriaEditorsTest extends HibernateTest {
-
-	/**
-	 * TC 19
-	 */
-	@Test
-	public void checkHQLEditor() {
-
-	}
-
-	/**
-	 * TC 19
-	 */
-	@Test
-	public void checkCriteriaEditor() {
-
-	}
-
-}

Deleted: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/DaliTest.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/DaliTest.java	2012-03-19 10:21:34 UTC (rev 39608)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/DaliTest.java	2012-03-19 11:16:28 UTC (rev 39609)
@@ -1,213 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2009 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributor:
- *     Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.ui.bot.testcase;
-
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotMultiPageEditor;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
-import org.jboss.tools.hibernate.ui.bot.testsuite.Project;
-import org.jboss.tools.ui.bot.ext.config.Annotations.DB;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
-import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
-import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
-import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
-import org.jboss.tools.ui.bot.ext.helper.DatabaseHelper;
-import org.jboss.tools.ui.bot.ext.helper.StringHelper;
-import org.jboss.tools.ui.bot.ext.parts.ContentAssistBot;
-import org.jboss.tools.ui.bot.ext.parts.SWTBotEditorExt;
-import org.jboss.tools.ui.bot.ext.types.EntityType;
-import org.jboss.tools.ui.bot.ext.types.IDELabel;
-import org.jboss.tools.ui.bot.ext.types.PerspectiveType;
-import org.jboss.tools.ui.bot.ext.view.ProjectExplorer;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.osgi.framework.Version;
-
- at Require( clearProjects = false,  db=@DB, perspective="JPA" , server=@Server(state = ServerState.Present))
-public class DaliTest extends HibernateTest {
-
-	private static boolean projectCreated = false;
-
-	@BeforeClass
-	public static void prepare() {
-		eclipse.closeView(IDELabel.View.WELCOME);
-		eclipse.openPerspective(PerspectiveType.JPA);
-		util.waitForNonIgnoredJobs();
-	}
-	
-	/**
-	 * TC 22 - Test creates JPA Project
-	 */
-	@Test
-	public void createJPAProject() {
-		if (projectCreated)
-			return;
-
-		EntityType type = EntityType.JPA_PROJECT;
-		eclipse.createNew(type);
-
-		// JPA Project Page
-		eclipse.waitForShell("New JPA Project");
-		bot.textWithLabel("Project name:").setText(Project.JPA_PRJ_NAME); 
-		bot.comboBoxInGroup("Target runtime").setSelection(TestConfigurator.currentConfig.getServer().getName());
-		
-		
-		bot.button(IDELabel.Button.NEXT).click();
-
-		// Java Page
-		bot.button(IDELabel.Button.NEXT).click();
-
-		// JPA Facet Page
-		Version version = jbt.getJBTVersion();
-		if ((version.getMajor() == 3) && (version.getMinor() == 1))		
-			bot.comboBoxInGroup("Platform").setSelection("Hibernate");
-		else
-			bot.comboBoxInGroup("Platform").setSelection("Hibernate (JPA 2.x)");
-		
-		bot.comboBoxInGroup("JPA implementation").setSelection("Library Provided by Target Runtime");		
-		bot.comboBoxInGroup("Connection").setSelection(TestConfigurator.currentConfig.getDB().name);
-
-		// Finish
-		bot.button(IDELabel.Button.FINISH).click();
-		eclipse.waitForClosedShell(bot.shell("New JPA Project"));
-		util.waitForNonIgnoredJobs();
-
-		projectCreated = true;
-	}
-
-	/**
-	 * Test open persistence.xml of JPA project
-	 */
-	@Test
-	public void openPersitenceXML() {
-		ProjectExplorer explorer = new ProjectExplorer();
-		explorer.openFile(Project.JPA_PRJ_NAME, "JPA Content",
-				"persistence.xml");
-	}
-
-	/**
-	 * TC 24 - Test generates DDL file
-	 */
-	@Test
-	public void generateDDL() {
-		// Select project
-		SWTBotView viewBot = bot.viewByTitle(IDELabel.View.PROJECT_EXPLORER);
-		SWTBotTree tree = viewBot.bot().tree().select(Project.JPA_PRJ_NAME);
-
-		// JPA Tools -> Generate Tables From Entities
-		ContextMenuHelper.clickContextMenu(tree, "JPA Tools",
-				"Generate Tables from Entities...");
-
-		// DDL Generation Dialog
-		String outputDir = Project.JPA_PRJ_NAME + "/" + Project.DDL_OUTPUT;
-		bot.textWithLabel("Output directory:").setText(outputDir);
-		bot.textWithLabel("File name").setText(Project.DDL_OUTPUT);
-
-		bot.button(IDELabel.Button.FINISH).click();
-	}
-
-	/**
-	 * TC 24 - Test for generating Entities from Tables
-	 */
-	@Test
-	public void generateEntities() {
-		// Select project
-		SWTBotView viewBot = bot.viewByTitle(IDELabel.View.PROJECT_EXPLORER);
-		SWTBotTree tree = viewBot.bot().tree().select(Project.JPA_PRJ_NAME);
-
-		// JPA Tools -> Generate Tables From Entities
-		ContextMenuHelper.clickContextMenu(tree, "JPA Tools",
-				"Generate Entities from Tables...");
-
-		// Generation Entities dialog
-		bot.textWithLabel("Package:").setText(Project.ENTITIES_PACKAGE);
-		bot.button(IDELabel.Button.FINISH).click();
-		util.waitForNonIgnoredJobs();
-		
-		// Check generated entities
-		packageExplorer.openFile(Project.JPA_PRJ_NAME, "src", Project.ENTITIES_PACKAGE, "Customers.java");
-	}
-
-	/**
-	 * TC 23 - Check JPA perspective views
-	 */
-	@Test
-	public void checkJPAPerspective() {
-		bot.viewByTitle("JPA Structure").setFocus();
-		bot.viewByTitle("JPA Details").setFocus();
-		bot.viewByTitle("Data Source Explorer").setFocus();
-	}
-
-	
-	/**
-	 * TC 25 - Checking coding configuration in persistence.xml editor on xml page 
-	 */
-	@Test
-	public void checkCAInConfigurationEditorXML() {
-		SWTBotEditor editor = 	bot.editorByTitle("persistence.xml");
-		editor.show();
-		SWTBotMultiPageEditor mpe = new SWTBotMultiPageEditor(editor.getReference(), bot);
-		mpe.activatePage("Source");
-		
-		// Code completion
-		String text = mpe.toTextEditor().getText();
-		StringHelper helper = new StringHelper(text);
-		Point p = helper.getPositionBefore("</persistence-unit>");
-		editor.toTextEditor().selectRange(p.y, p.x, 0);
-		editor.save();
-		SWTBotEditorExt editorExt = new SWTBotEditorExt(editor.getReference(), bot);
-		ContentAssistBot ca = new ContentAssistBot(editorExt);
-		ca.useProposal("class");	
-	}
-
-
-	/**
-	 * TC 25 - Filling hibernate page on persistence.xml editor
-	 */
-	@Test
-	public void fillHibernatePage() {
-		SWTBotEditor editor = 	bot.editorByTitle("persistence.xml");
-		editor.show();
-		SWTBotMultiPageEditor mpe = new SWTBotMultiPageEditor(editor.getReference(), bot);
-		mpe.activatePage("Hibernate");
-
-		// Fill in 
-		String dialect = DatabaseHelper.getDialect(TestConfigurator.currentConfig.getDB().dbType);
-		bot.comboBoxWithLabel(IDELabel.HBConsoleWizard.DATABASE_DIALECT).setSelection(dialect);
-		String drvClass = DatabaseHelper.getDriverClass(TestConfigurator.currentConfig.getDB().dbType);
-		bot.comboBoxWithLabel(IDELabel.HBConsoleWizard.DRIVER_CLASS).setSelection(drvClass);		
-		String jdbc = TestConfigurator.currentConfig.getDB().jdbcString;
-		bot.comboBoxWithLabel(IDELabel.HBConsoleWizard.CONNECTION_URL).setText(jdbc);
-		bot.textWithLabel("Username:").setText("sa");
- 
-		editor.save();
-		mpe.activatePage("Source");
-
-		// Check xml content
-		String text = mpe.toTextEditor().getText();
-		StringHelper helper = new StringHelper(text);		
-		String str  =  "<property name=\"hibernate.dialect\" value=\"org.hibernate.dialect.HSQLDialect\"/>";
-		helper.getPositionBefore(str);
-		str  =  "<property name=\"hibernate.connection.driver_class\" value=\"org.hsqldb.jdbcDriver\"/>";
-		helper.getPositionBefore(str);
-		bot.sleep(TIME_10S);
-	}
-		
-	@AfterClass
-	public static void cleanup() {
-		log.info("JPA DaliTest cleanup");
-	}
-}

Deleted: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/MappingFileTest.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/MappingFileTest.java	2012-03-19 10:21:34 UTC (rev 39608)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/MappingFileTest.java	2012-03-19 11:16:28 UTC (rev 39609)
@@ -1,139 +0,0 @@
- /*******************************************************************************
-  * Copyright (c) 2007-2009 Red Hat, Inc.
-  * Distributed under license by Red Hat, Inc. All rights reserved.
-  * This program is made available under the terms of the
-  * Eclipse Public License v1.0 which accompanies this distribution,
-  * and is available at http://www.eclipse.org/legal/epl-v10.html
-  *
-  * Contributor:
-  *     Red Hat, Inc. - initial API and implementation
-  ******************************************************************************/
-package org.jboss.tools.hibernate.ui.bot.testcase;
-
-import java.util.List;
-
-import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
-import org.jboss.tools.hibernate.ui.bot.testsuite.Project;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.parts.ObjectMultiPageEditorBot;
-import org.jboss.tools.ui.bot.ext.parts.SWTBotEditorExt;
-import org.jboss.tools.ui.bot.ext.types.EntityType;
-import org.jboss.tools.ui.bot.ext.types.IDELabel;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
- at Require( clearProjects = false,  perspective="Hibernate")
-public class MappingFileTest extends HibernateTest {
-
-	@BeforeClass
-	public static void setUpTest() {
-		prepareProject();
-		prepareClasses();
-	}
-	
-	@AfterClass
-	public static void tearDownTest() { 
-	}
-
-	/**
-	 * TC 01 - Create Hibernate Mapping file (when package is selected)
-	 * Create new .hbm.xml
-	 * ASSERT: No exception
-	 * Select Class to map 
-	 * ASSERT: .hbm.xml must appears in JBoss Editor
-	 * Note: 2 Way check Created from package and classes
-	 */	
-	@Test
-	public void createFile() {	
-		createFilesFromPackage();
-		
-		// Remove files generated in the first round
-		eclipse.removeFile(Project.PROJECT_NAME,"src",Project.PACKAGE_NAME,Project.CLASS1 + ".hbm.xml");
-		eclipse.removeFile(Project.PROJECT_NAME,"src",Project.PACKAGE_NAME,Project.CLASS2 + ".hbm.xml");
-				
-		createFilesFromClasses();
-	}
-
-	/**
-	 * Create Hibernate Mapping file from selected classes
-	 */
-	private void createFilesFromClasses() {
-		// Select Both classes
-		SWTBot viewBot = bot.viewByTitle(IDELabel.View.PACKAGE_EXPLORER).bot();
-		SWTBotTreeItem item = viewBot.tree().expandNode(Project.PROJECT_NAME).expandNode("src");	
-		item = item.expandNode(Project.PACKAGE_NAME).select();
-		item.select(Project.CLASS1+".java",Project.CLASS2+".java");			
-		
-		// Create mapping files 
-		eclipse.createNew(EntityType.HIBERNATE_MAPPING_FILE);
-
-		bot.button(IDELabel.Button.NEXT).click();
-		bot.button(IDELabel.Button.FINISH).click();
-		util.waitForNonIgnoredJobs();
-		
-		// Check if new mapping files exists
-		eclipse.openFile(Project.PROJECT_NAME,"src",Project.PACKAGE_NAME,Project.CLASS1 + ".hbm.xml" );
-		eclipse.openFile(Project.PROJECT_NAME,"src",Project.PACKAGE_NAME,Project.CLASS2 + ".hbm.xml" );
-	}
-	
-	/**
-	 * Create Hibernate mapping files from selected package
-	 */
-	private void createFilesFromPackage() {
-		// Select Package file
-		SWTBot viewBot = bot.viewByTitle(IDELabel.View.PACKAGE_EXPLORER).bot();
-		bot.viewByTitle(IDELabel.View.PACKAGE_EXPLORER).show();
-		bot.viewByTitle(IDELabel.View.PACKAGE_EXPLORER).setFocus();
-		SWTBotTreeItem item = viewBot.tree().expandNode(Project.PROJECT_NAME).expandNode("src");	
-		item = item.expandNode(Project.PACKAGE_NAME).select();
-		
-		// Create mapping files 
-		eclipse.createNew(EntityType.HIBERNATE_MAPPING_FILE);
-		bot.button(IDELabel.Button.FINISH).click();
-		util.waitForNonIgnoredJobs();
-				
-		// Check if new mapping files exists
-		eclipse.openFile(Project.PROJECT_NAME,"src",Project.PACKAGE_NAME,Project.CLASS1 + ".hbm.xml" );
-		eclipse.openFile(Project.PROJECT_NAME,"src",Project.PACKAGE_NAME,Project.CLASS2 + ".hbm.xml" );
-}
-	
-	/**
-	 * TC 14 - Editing Hibernate Mapping file
-	 */
-	@Test
-	public void editFile() {
-		// Open Hibernate Mapping File (ObjectMultiPageEditor on source tab)
-		eclipse.openFile(Project.PROJECT_NAME,"src",Project.PACKAGE_NAME,Project.CLASS1 + ".hbm.xml");
-		ObjectMultiPageEditorBot pageBot = new ObjectMultiPageEditorBot(Project.CLASS1 + ".hbm.xml");
-		pageBot.selectPage("Source");
-		
-		// Check code completion
-		SWTBotEditorExt editor = bot.swtBotEditorExtByTitle(Project.CLASS1 + ".hbm.xml");
-		
-		String search = "</id>";  
-		List<String> lines = editor.getLines();
-		
-		int index = 0;
-		for (String line : lines ) {
-			index++;
-			if (line.trim().equals(search)) break;
-		}
-
-		log.info("Line index: " + index);
-
-		// Insert tag for cc check
-		String newLine = "<property name=\"\"> ";
-		int col = newLine.indexOf("\"\"");
-		editor.selectRange(index, 0, 0);
-		editor.insertText("\n");
-		editor.insertText(newLine);
-		editor.selectRange(index, col + 1, 0);
-		
-		// TODO autocomplete proposal check
-		
-		editor.save();		
-	}
-}

Deleted: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/MappingsDiagramTest.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/MappingsDiagramTest.java	2012-03-19 10:21:34 UTC (rev 39608)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/MappingsDiagramTest.java	2012-03-19 11:16:28 UTC (rev 39609)
@@ -1,59 +0,0 @@
- /*******************************************************************************
-  * Copyright (c) 2007-2009 Red Hat, Inc.
-  * Distributed under license by Red Hat, Inc. All rights reserved.
-  * This program is made available under the terms of the
-  * Eclipse Public License v1.0 which accompanies this distribution,
-  * and is available at http://www.eclipse.org/legal/epl-v10.html
-  *
-  * Contributor:
-  *     Red Hat, Inc. - initial API and implementation
-  ******************************************************************************/
-package org.jboss.tools.hibernate.ui.bot.testcase;
-
-import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
-import org.jboss.tools.hibernate.ui.bot.testsuite.Project;
-import org.jboss.tools.ui.bot.ext.config.Annotations.DB;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.gen.ActionItem;
-import org.jboss.tools.ui.bot.ext.types.IDELabel;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
- at Require( db=@DB, perspective="Hibernate")
-public class MappingsDiagramTest extends HibernateTest {
-
-	@BeforeClass
-	/**
-	 * Setup prerequisites for this test
-	 */
-	public static void setUpTest() {
-
-		eclipse.maximizeActiveShell();
-		eclipse.closeView(IDELabel.View.WELCOME);
-		
-		prepareProject();
-		ConsoleTest test = new ConsoleTest();
-		test.createConsole();
-
-		util.waitForNonIgnoredJobs();
-	}
-	
-	/**
-	 * Test mapping diagram
-	 */
-	@Test
-	public void testDiagram() {
-		
-		CodeGenerationLauncherTest test = new CodeGenerationLauncherTest();
-		test.generate();
-		
-		SWTBot viewBot = open.viewOpen(ActionItem.View.HibernateHibernateConfigurations.LABEL).bot();	
-		SWTBotTreeItem console = viewBot.tree().expandNode(Project.PROJECT_NAME);
-		bot.sleep(TIME_1S);	
-		
-		console.contextMenu("Mapping Diagram").click();
-	}
-
-}

Deleted: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ReverseEngineerFileTest.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ReverseEngineerFileTest.java	2012-03-19 10:21:34 UTC (rev 39608)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ReverseEngineerFileTest.java	2012-03-19 11:16:28 UTC (rev 39609)
@@ -1,56 +0,0 @@
- /*******************************************************************************
-  * Copyright (c) 2007-2009 Red Hat, Inc.
-  * Distributed under license by Red Hat, Inc. All rights reserved.
-  * This program is made available under the terms of the
-  * Eclipse Public License v1.0 which accompanies this distribution,
-  * and is available at http://www.eclipse.org/legal/epl-v10.html
-  *
-  * Contributor:
-  *     Red Hat, Inc. - initial API and implementation
-  ******************************************************************************/
-package org.jboss.tools.hibernate.ui.bot.testcase;
-
-import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
-import org.jboss.tools.hibernate.ui.bot.testsuite.Project;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.types.EntityType;
-import org.jboss.tools.ui.bot.ext.types.IDELabel;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
- at Require(clearProjects = false,  perspective="Hibernate")
-public class ReverseEngineerFileTest extends HibernateTest {
-
-	@BeforeClass
-	public static void prepare() {
-		prepareProject();
-	}
-	/**
-	 * TC 08
-	 */
-	@Test
-	public void createFile() {
-		
-		bot.viewByTitle(IDELabel.View.PACKAGE_EXPLORER).setFocus();
-		packageExplorer.selectProject(Project.PROJECT_NAME);
-		
-		// Create reveng file
-		eclipse.createNew(EntityType.HIBERNATE_REVERSE_FILE);
-		bot.clickButton(IDELabel.Button.NEXT);
-		bot.clickButton("Include...");
-		bot.clickButton(IDELabel.Button.FINISH);				
-	}
-
-	/**
-	 * TC 15
-	 */
-	@Test
-	public void editFile() {
-		// TBD
-	}
-	
-	@AfterClass
-	public static void finish() {
-	}
-}

Deleted: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/StaticTest.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/StaticTest.java	2012-03-19 10:21:34 UTC (rev 39608)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/StaticTest.java	2012-03-19 11:16:28 UTC (rev 39609)
@@ -1,38 +0,0 @@
-package org.jboss.tools.hibernate.ui.bot.testcase;
-
-import java.io.File;
-
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.config.Annotations.DB;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.helper.FileHelper;
-import org.jboss.tools.ui.bot.ext.helper.ImportHelper;
-import org.jboss.tools.ui.bot.ext.helper.ResourceHelper;
-import org.junit.Test;
-
- at Require(db=@DB, clearProjects = false,  perspective="Hibernate")
-public class StaticTest extends SWTTestExt {
-		
-	@Test 
-	public void importHibernateProjects() {
-		String rpath = ResourceHelper.getResourceAbsolutePath(
-				Activator.PLUGIN_ID, "resources/prj");
-		String wpath = ResourceHelper.getWorkspaceAbsolutePath();
-
-		String[] projects = {"hibernate35.zip","hibernate36.zip","hibernate40.zip"};
-		File outputDir = new File(wpath);
-		
-		for (int i = 0; i < projects.length; i++ ) {			
-			File archive = new File(rpath + File.separator + projects[i]);
-			try {
-				FileHelper.unzipArchive(archive, outputDir);
-			} catch (Exception e) {
-				fail("Unable to extract projects");
-			}
-		}
-		
-		ImportHelper.importAllProjects(wpath);
-	}
-	
-	
-}

Deleted: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ViewsTest.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ViewsTest.java	2012-03-19 10:21:34 UTC (rev 39608)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ViewsTest.java	2012-03-19 11:16:28 UTC (rev 39609)
@@ -1,29 +0,0 @@
- /*******************************************************************************
-  * Copyright (c) 2007-2009 Red Hat, Inc.
-  * Distributed under license by Red Hat, Inc. All rights reserved.
-  * This program is made available under the terms of the
-  * Eclipse Public License v1.0 which accompanies this distribution,
-  * and is available at http://www.eclipse.org/legal/epl-v10.html
-  *
-  * Contributor:
-  *     Red Hat, Inc. - initial API and implementation
-  ******************************************************************************/
-package org.jboss.tools.hibernate.ui.bot.testcase;
-
-import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
-import org.jboss.tools.ui.bot.ext.config.Annotations.DB;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.junit.Test;
-
- at Require( db=@DB, perspective="Hibernate")
-public class ViewsTest extends HibernateTest {
-
-	/**
-	 * TC 20
-	 */
-	@Test
-	public void checkViews() {
-
-	}
-
-}



More information about the jbosstools-commits mailing list