Author: jpeterka
Date: 2011-03-15 11:19:53 -0400 (Tue, 15 Mar 2011)
New Revision: 29790
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/test/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/test/util/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/test/util/DataHolder.java
Modified:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/CodeGenerationLauncherTest.java
Log:
hibernatebot: code generation is independent on database content
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/test/util/DataHolder.java
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/test/util/DataHolder.java
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/test/util/DataHolder.java 2011-03-15
15:19:53 UTC (rev 29790)
@@ -0,0 +1,11 @@
+package org.jboss.tools.hibernate.ui.bot.test.util;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Holds data accross between tests
+ */
+public class DataHolder {
+ public static List<String> tables = new ArrayList<String>();
+}
Property changes on:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/test/util/DataHolder.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
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 2011-03-15
13:37:14 UTC (rev 29789)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/CodeGenerationLauncherTest.java 2011-03-15
15:19:53 UTC (rev 29790)
@@ -16,6 +16,7 @@
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;
@@ -89,10 +90,11 @@
open.viewOpen(ActionItem.View.JavaPackageExplorer.LABEL);
- packageExplorer.openFile(Project.PROJECT_NAME,"gen","org","test","Customers.java");
- packageExplorer.openFile(Project.PROJECT_NAME,"gen","org","test","Customers.java");
- packageExplorer.openFile(Project.PROJECT_NAME,"gen","org","test","Employees.java");
- packageExplorer.openFile(Project.PROJECT_NAME,"gen","org","test","Offices.java");
+
+ 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");
}