Author: jpeterka
Date: 2009-11-10 11:48:58 -0500 (Tue, 10 Nov 2009)
New Revision: 18574
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/.classpath
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/.project
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/.settings/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/META-INF/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/META-INF/MANIFEST.MF
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/build.properties
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/hibernate.cfg.xml
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/project.properties
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/src/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/src/org.jboss.hibernate.test/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/src/org.jboss.hibernate.test/Customer.java
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/src/org.jboss.hibernate.test/Order.java
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/log4j.xml
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/Activator.java
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/ConfigurationContextTest.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/JIRATest.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/ViewsTest.java
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/HibernateAllTests.java
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/HibernateTest.java
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/Project.java
Log:
Initial commit of skeleton of hibernate tools swtbot tests
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/.classpath
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/.classpath
(rev 0)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/.classpath 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry combineaccessrules="false" kind="src"
path="/org.jboss.tools.ui.bot.ext"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/.project
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/.project
(rev 0)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/.project 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.hibernate.ui.bot.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/.settings/org.eclipse.jdt.core.prefs 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,8 @@
+#Mon Aug 31 15:12:26 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added:
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
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/META-INF/MANIFEST.MF 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Hibernate Tools SWTBot Tests
+Bundle-SymbolicName: org.jboss.tools.hibernate.ui.bot.test
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.jboss.tools.hibernate.ui.bot.testcase.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.junit4,
+ org.apache.log4j;bundle-version="1.2.13",
+ org.eclipse.swtbot.eclipse.core;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.spy;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.ui;bundle-version="2.0.0",
+ org.eclipse.swtbot.junit4_x;bundle-version="2.0.0",
+ org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
+ org.jboss.tools.ui.bot.ext;bundle-version="1.0.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Eclipse-RegisterBuddy: org.apache.log4j
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/build.properties
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/build.properties
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/build.properties 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,5 @@
+source.. = src/,\
+ resources/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/hibernate.cfg.xml
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/hibernate.cfg.xml
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/hibernate.cfg.xml 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+<hibernate-configuration>
+ <session-factory>
+ </session-factory>
+</hibernate-configuration>
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/project.properties
===================================================================
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/src/org.jboss.hibernate.test/Customer.java
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/src/org.jboss.hibernate.test/Customer.java
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/src/org.jboss.hibernate.test/Customer.java 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,11 @@
+package org.jboss.hibernate.test;
+
+import java.util.List;
+
+public class Customer {
+
+ public String name;
+
+ List<Order> order;
+
+}
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/src/org.jboss.hibernate.test/Order.java
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/src/org.jboss.hibernate.test/Order.java
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/src/org.jboss.hibernate.test/Order.java 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,22 @@
+package org.jboss.hibernate.test;
+
+public class Order {
+ private long id;
+ private long sum;
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public long getSum() {
+ return sum;
+ }
+
+ public void setSum(long sum) {
+ this.sum = sum;
+ }
+}
Added: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/log4j.xml
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/log4j.xml
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/log4j.xml 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration
xmlns:log4j="http://jakarta.apache.org/log4j/"
+ debug="false">
+
+ <appender name="consoleAppender"
class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern"
+ value="%d{dd MMM yyyy HH:mm:ss.SSS} - %25t - %-5p - %30c{1} - (%C{1}.java:%L) -
%m%n" />
+ </layout>
+ </appender>
+
+ <appender name="fileAppender"
class="org.apache.log4j.FileAppender">
+ <param name="File" value="/tmp/debug.log" />
+ <param name="Append" value="false" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern"
+ value="%d{dd MMM yyyy HH:mm:ss.SSS} - %25t - %-5p - %30c{1} - (%C{1}.java:%L) -
%m%n" />
+ </layout>
+ </appender>
+
+ <appender name="asyncAppender"
class="org.apache.log4j.AsyncAppender">
+ <appender-ref ref="consoleAppender" />
+ <appender-ref ref="fileAppender" />
+ </appender>
+
+ <!-- don't log matchers, this is very high amount of chatter -->
+ <category name="org.eclipse.swtbot.swt.finder.matchers">
+ <priority value="OFF" />
+ </category>
+
+ <!--
+ don't log widget notification events, this is moderately high chatter
+ -->
+ <category name="org.eclipse.swtbot.swt.finder.widgets">
+ <priority value="OFF" />
+ </category>
+
+ <!-- don't log finders, this is moderate chatter -->
+ <category name="org.eclipse.swtbot.swt.finder.finders">
+ <priority value="DEBUG" />
+ </category>
+
+ <category name="org.eclipse.swtbot.swt.finder.keyboard">
+ <!-- set to a value higher than debug to turn on. -->
+ <priority value="DEBUG" />
+ </category>
+
+ <category name="org.eclipse.swtbot">
+ <priority value="ALL" />
+ </category>
+
+ <root>
+ <priority value="INFO" />
+ <appender-ref ref="consoleAppender" />
+ <appender-ref ref="fileAppender" />
+ </root>
+
+</log4j:configuration>
\ No newline at end of file
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/Activator.java
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/Activator.java
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/Activator.java 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,66 @@
+ /*******************************************************************************
+ * 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.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID =
"org.jboss.tools.hibernate.ui.bot.test";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
+ * )
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
+ * )
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
Added:
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
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/CodeGenerationLauncherTest.java 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,53 @@
+ /*******************************************************************************
+ * 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.junit.SWTBotJunit4ClassRunner;
+import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+(a)RunWith(SWTBotJunit4ClassRunner.class)
+public class CodeGenerationLauncherTest extends HibernateTest {
+
+ /**
+ * TC 09
+ */
+ @Test
+ public void fillMainTab() {
+
+ }
+
+ /**
+ * TC 10
+ */
+ @Test
+ public void fillExportersTab() {
+
+ }
+
+ /**
+ * TC 11
+ */
+ @Test
+ public void fillRefreshTab() {
+
+ }
+
+ /**
+ * TC 12
+ */
+ @Test
+ public void fillCommonTab() {
+
+ }
+
+}
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConfigurationContextTest.java
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConfigurationContextTest.java
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConfigurationContextTest.java 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,29 @@
+ /*******************************************************************************
+ * 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.junit.SWTBotJunit4ClassRunner;
+import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+(a)RunWith(SWTBotJunit4ClassRunner.class)
+public class ConfigurationContextTest extends HibernateTest {
+
+ /**
+ * TC 18
+ */
+ @Test
+ public void checkHibernateConfiguration() {
+
+ }
+
+}
Added:
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
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConfigurationFileTest.java 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,37 @@
+ /*******************************************************************************
+ * 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.junit.SWTBotJunit4ClassRunner;
+import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+(a)RunWith(SWTBotJunit4ClassRunner.class)
+public class ConfigurationFileTest extends HibernateTest {
+
+ /**
+ * TC 02
+ */
+ @Test
+ public void createFile() {
+
+ }
+
+ /**
+ * TC 13
+ */
+ @Test
+ public void editFile() {
+
+ }
+
+}
Added:
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
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConsolePerspectiveTest.java 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,29 @@
+ /*******************************************************************************
+ * 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.junit.SWTBotJunit4ClassRunner;
+import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+(a)RunWith(SWTBotJunit4ClassRunner.class)
+public class ConsolePerspectiveTest extends HibernateTest {
+
+ /**
+ * TC 17
+ */
+ @Test
+ public void openPerspectiveElements() {
+
+ }
+
+}
Added:
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
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConsoleTest.java 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,69 @@
+ /*******************************************************************************
+ * 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.junit.SWTBotJunit4ClassRunner;
+import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+(a)RunWith(SWTBotJunit4ClassRunner.class)
+public class ConsoleTest extends HibernateTest {
+
+ /**
+ * TC 03
+ */
+ @Test
+ public void createMainTab() {
+
+ }
+
+ /**
+ * TC 04
+ */
+ @Test
+ public void createOptionTab() {
+
+ }
+
+ /**
+ * TC 05
+ */
+ @Test
+ public void createClasspathTab() {
+
+ }
+
+ /**
+ * TC 06
+ */
+ @Test
+ public void createMappingsTab() {
+
+ }
+
+ /**
+ * TC 07
+ */
+ @Test
+ public void createCommonTab() {
+
+ }
+
+ /**
+ * TC 16
+ */
+ @Test
+ public void editConsole() {
+
+ }
+
+}
Added:
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
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/CriteriaEditorsTest.java 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,37 @@
+ /*******************************************************************************
+ * 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.junit.SWTBotJunit4ClassRunner;
+import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+(a)RunWith(SWTBotJunit4ClassRunner.class)
+public class CriteriaEditorsTest extends HibernateTest {
+
+ /**
+ * TC 19
+ */
+ @Test
+ public void checkHQLEditor() {
+
+ }
+
+ /**
+ * TC 19
+ */
+ @Test
+ public void checkCriteriaEditor() {
+
+ }
+
+}
Added:
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
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/DaliTest.java 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,69 @@
+ /*******************************************************************************
+ * 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.junit.SWTBotJunit4ClassRunner;
+import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+(a)RunWith(SWTBotJunit4ClassRunner.class)
+public class DaliTest extends HibernateTest {
+
+ /**
+ * TC 22
+ */
+ @Test
+ public void createJPAProject() {
+
+ }
+
+ /**
+ * TC 24
+ */
+ @Test
+ public void generateDDL() {
+
+ }
+
+ /**
+ * TC 24
+ */
+ @Test
+ public void generateEntities() {
+
+ }
+
+ /**
+ * TC 23
+ */
+ @Test
+ public void checkJPAPerspective() {
+
+ }
+
+ /**
+ * TC 25
+ */
+ @Test
+ public void checkCAInConfigurationEditor() {
+
+ }
+
+ /**
+ * TC 25
+ */
+ @Test
+ public void checkCAInMappingEditor() {
+
+ }
+
+}
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/JIRATest.java
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/JIRATest.java
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/JIRATest.java 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,29 @@
+ /*******************************************************************************
+ * 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.junit.SWTBotJunit4ClassRunner;
+import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+(a)RunWith(SWTBotJunit4ClassRunner.class)
+public class JIRATest extends HibernateTest {
+
+ /**
+ * TC 99
+ */
+ @Test
+ public void issue1() {
+
+ }
+
+}
Added:
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
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/MappingFileTest.java 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,100 @@
+ /*******************************************************************************
+ * 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.junit.SWTBotJunit4ClassRunner;
+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.types.EntityType;
+import org.jboss.tools.ui.bot.ext.types.Label;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+(a)RunWith(SWTBotJunit4ClassRunner.class)
+public class MappingFileTest extends HibernateTest {
+
+ @BeforeClass
+ public static void setUp() {
+ HibernateTest.prepare();
+ }
+
+ @AfterClass
+ public static void tearDown() {
+ HibernateTest.clean();
+ }
+
+ /**
+ * TC 01 - Create Hibernate Mapping file (when package is selected)
+ */
+ @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(Label.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);
+ eclipse.waitForShell(Label.Shell.NEW_HIBERNATE_MAPPING_FILE);
+ bot.button(Label.Button.NEXT).click();
+ bot.button(Label.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(Label.View.PACKAGE_EXPLORER).bot();
+ 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);
+ eclipse.waitForShell(Label.Shell.NEW_HIBERNATE_MAPPING_FILE);
+ bot.button(Label.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() {
+ }
+}
Added:
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
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/MappingsDiagramTest.java 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,29 @@
+ /*******************************************************************************
+ * 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.junit.SWTBotJunit4ClassRunner;
+import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+(a)RunWith(SWTBotJunit4ClassRunner.class)
+public class MappingsDiagramTest extends HibernateTest {
+
+ /**
+ * TC 21
+ */
+ @Test
+ public void testDiagram() {
+
+ }
+
+}
Added:
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
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ReverseEngineerFileTest.java 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,37 @@
+ /*******************************************************************************
+ * 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.junit.SWTBotJunit4ClassRunner;
+import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+(a)RunWith(SWTBotJunit4ClassRunner.class)
+public class ReverseEngineerFileTest extends HibernateTest {
+
+ /**
+ * TC 08
+ */
+ @Test
+ public void createFile() {
+
+ }
+
+ /**
+ * TC 15
+ */
+ @Test
+ public void editFile() {
+
+ }
+
+}
Added:
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
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ViewsTest.java 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,29 @@
+ /*******************************************************************************
+ * 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.junit.SWTBotJunit4ClassRunner;
+import org.jboss.tools.hibernate.ui.bot.testsuite.HibernateTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+(a)RunWith(SWTBotJunit4ClassRunner.class)
+public class ViewsTest extends HibernateTest {
+
+ /**
+ * TC 20
+ */
+ @Test
+ public void checkViews() {
+
+ }
+
+}
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/HibernateAllTests.java
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/HibernateAllTests.java
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/HibernateAllTests.java 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,38 @@
+ /*******************************************************************************
+ * 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.testsuite;
+
+import org.jboss.tools.hibernate.ui.bot.testcase.MappingFileTest;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+(a)RunWith(Suite.class)
+@SuiteClasses( { /*CodeGenerationLauncherTest.class,
+ ConfigurationContextTest.class, ConfigurationFileTest.class,
+ ConsolePerspectiveTest.class, ConsoleTest.class,
+ CriteriaEditorsTest.class, DaliTest.class, JIRATest.class,*/
+ MappingFileTest.class/*, MappingsDiagramTest.class,
+ ReverseEngineerFileTest.class, ViewsTest.class */})
+public class HibernateAllTests extends HibernateTest {
+
+ @BeforeClass
+ public static void setUp() {
+ HibernateTest.prepare();
+ }
+
+ @AfterClass
+ public static void tearDown() {
+ HibernateTest.clean();
+ }
+}
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/HibernateTest.java
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/HibernateTest.java
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/HibernateTest.java 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,66 @@
+ /*******************************************************************************
+ * 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.testsuite;
+
+import org.jboss.tools.hibernate.ui.bot.testcase.Activator;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.entity.JavaClassEntity;
+import org.jboss.tools.ui.bot.ext.entity.JavaProjectEntity;
+import org.jboss.tools.ui.bot.ext.types.Label;
+import org.jboss.tools.ui.bot.ext.types.PerspectiveType;
+
+public class HibernateTest extends SWTTestExt {
+
+ private static boolean prepared = false;
+ //private static Properties properties;
+
+ public static void prepare() {
+
+ if (prepared == true)
+ return;
+
+ log.info("Hibernate test preparation started");
+ // Load project properties (not needed yet)
+ // loadProperties(Activator.PLUGIN_ID);
+
+ // Show perspective and view
+ eclipse.closeView(Label.View.WELCOME);
+ eclipse.openPerspective(PerspectiveType.JAVA);
+
+ // Create needed project
+ // Prepare entity
+ JavaProjectEntity projectEntity = new JavaProjectEntity();
+ projectEntity.setProjectName(Project.PROJECT_NAME);
+ eclipse.createJavaProject(projectEntity);
+
+ // Create classes
+ // Class 1
+ JavaClassEntity classEntity = new JavaClassEntity();
+ classEntity.setClassName(Project.CLASS1);
+ classEntity.setPackageName(Project.PACKAGE_NAME);
+ eclipse.createJavaClass(classEntity);
+ eclipse.setClassContentFromResource(Activator.PLUGIN_ID, "src",
Project.PACKAGE_NAME, Project.CLASS1+".java");
+
+ // Class 2
+ classEntity.setClassName(Project.CLASS2);
+ classEntity.setPackageName(Project.PACKAGE_NAME);
+ eclipse.createJavaClass(classEntity);
+ eclipse.setClassContentFromResource(Activator.PLUGIN_ID, "src",
Project.PACKAGE_NAME, Project.CLASS2+".java");
+
+ prepared = true;
+ log.info("Hibernate test preparation finished");
+ }
+
+ public static void clean() {
+ log.info("Clean finished");
+ bot.sleep(TIME_10S);
+ }
+}
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/Project.java
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/Project.java
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/Project.java 2009-11-10
16:48:58 UTC (rev 18574)
@@ -0,0 +1,24 @@
+ /*******************************************************************************
+ * 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.testsuite;
+
+/**
+ * Hibernate Test Suite properties. Properties for all tests and test prerequisites
+ * @author jpeterka
+ *
+ */
+public class Project {
+ public static final String CLASS1 = "Customer";
+ public static final String CLASS2 = "Order";
+ public static final String PACKAGE_NAME = "org.jboss.hibernate.test";
+ public static final String PROJECT_NAME = "HibernateTest";
+
+}