Author: jpeterka
Date: 2010-10-26 07:40:07 -0400 (Tue, 26 Oct 2010)
New Revision: 26064
Added:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.classpath
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.project
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.settings/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/META-INF/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/META-INF/MANIFEST.MF
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/build.properties
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/launcher/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/launcher/SmooksAllTests.launch
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/Header.java
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/Order.java
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/OrderItem.java
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/xml/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/xml/order.xml
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/Copy of log4j.xml
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/log4j.xml
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/test/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/test/Activator.java
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/testcase/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/testcase/SmooksProject.java
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/Project.java
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksAllTests.java
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksTest.java
Log:
Initial commit of Smooks SWTBot tests
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.classpath
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.classpath
(rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.classpath 2010-10-26 11:40:07
UTC (rev 26064)
@@ -0,0 +1,7 @@
+<?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/JavaSE-1.6"/>
+ <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.project
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.project
(rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.project 2010-10-26 11:40:07 UTC
(rev 26064)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.smooks.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>
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
===================================================================
---
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.settings/org.eclipse.jdt.core.prefs 2010-10-26
11:40:07 UTC (rev 26064)
@@ -0,0 +1,8 @@
+#Tue Oct 19 12:13:26 CEST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Property changes on:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/META-INF/MANIFEST.MF
(rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/META-INF/MANIFEST.MF 2010-10-26
11:40:07 UTC (rev 26064)
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Test
+Bundle-SymbolicName: org.jboss.tools.smooks.ui.bot.test
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.jboss.tools.smooks.ui.bot.test.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ 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.gef.finder;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.junit3.headless;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.junit4.headless;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.ui;bundle-version="2.0.0",
+ org.eclipse.swtbot.go;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",
+ org.eclipse.zest.core;bundle-version="1.1.0",
+ org.eclipse.zest.layouts;bundle-version="1.1.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Property changes on:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/build.properties
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/build.properties
(rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/build.properties 2010-10-26
11:40:07 UTC (rev 26064)
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Property changes on:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/launcher/SmooksAllTests.launch
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/launcher/SmooksAllTests.launch
(rev 0)
+++
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/launcher/SmooksAllTests.launch 2010-10-26
11:40:07 UTC (rev 26064)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
+<launchConfiguration
type="org.eclipse.swtbot.eclipse.ui.launcher.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation"
value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location"
value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry
value="/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksAllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="DISPLAY" value=":1"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER"
value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR"
value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME"
value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND"
value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE"
value="org.jboss.tools.smooks.ui.bot.tests.SmooksAllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS"
value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}
-consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR"
value="org.jboss.tools.smooks.ui.bot.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER"
value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS"
value="-Xms256m -Xmx384m -XX:MaxPermSize=256M
-Dosgi.bundles=reference:file:org.eclipse.equinox.simpleconfigurator_1.0.200.v20100503.jar@1:start,org.eclipse.equinox.transforms.xslt@1:start,org.jboss.tools.equinox.transforms.xslt@1:start"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product"
value="com.jboss.jbds.product.product"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig"
value="${target_home}/configuration/config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
Property changes on:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/launcher/SmooksAllTests.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/Header.java
===================================================================
---
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/Header.java
(rev 0)
+++
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/Header.java 2010-10-26
11:40:07 UTC (rev 26064)
@@ -0,0 +1,34 @@
+package org.smooks;
+
+import java.util.Date;
+
+public class Header {
+ private Date date;
+ private Long customerNumber;
+ private String customerName;
+
+ public Date getDate() {
+ return date;
+ }
+
+ public void setDate(Date date) {
+ this.date = date;
+ }
+
+ public Long getCustomerNumber() {
+ return customerNumber;
+ }
+
+ public void setCustomerNumber(Long customerNumber) {
+ this.customerNumber = customerNumber;
+ }
+
+ public String getCustomerName() {
+ return customerName;
+ }
+
+ public void setCustomerName(String customerName) {
+ this.customerName = customerName;
+ }
+
+}
Property changes on:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/Header.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/Order.java
===================================================================
---
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/Order.java
(rev 0)
+++
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/Order.java 2010-10-26
11:40:07 UTC (rev 26064)
@@ -0,0 +1,28 @@
+package org.smooks;
+
+import java.util.List;
+
+import org.smooks.Header;
+import org.smooks.OrderItem;
+
+public class Order {
+ private Header header;
+ private List<OrderItem> orderItems;
+
+ public Header getHeader() {
+ return header;
+ }
+
+ public void setHeader(Header header) {
+ this.header = header;
+ }
+
+ public List<OrderItem> getOrderItems() {
+ return orderItems;
+ }
+
+ public void setOrderItems(List<OrderItem> orderItems) {
+ this.orderItems = orderItems;
+ }
+
+}
Property changes on:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/Order.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/OrderItem.java
===================================================================
---
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/OrderItem.java
(rev 0)
+++
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/OrderItem.java 2010-10-26
11:40:07 UTC (rev 26064)
@@ -0,0 +1,72 @@
+package org.smooks;
+
+public class OrderItem {
+ private long productId;
+ private Integer quantity;
+ private double price;
+
+ public long getProductId() {
+ return productId;
+ }
+
+ public void setProductId(long productId) {
+ this.productId = productId;
+ }
+
+ public Integer getQuantity() {
+ return quantity;
+ }
+
+ public void setQuantity(Integer quantity) {
+ this.quantity = quantity;
+ }
+
+ public double getPrice() {
+ return price;
+ }
+
+ public void setPrice(double price) {
+ this.price = price;
+ }
+
+ public byte byteValue() {
+ return quantity.byteValue();
+ }
+
+ public int compareTo(Integer anotherInteger) {
+ return quantity.compareTo(anotherInteger);
+ }
+
+ public double doubleValue() {
+ return quantity.doubleValue();
+ }
+
+ public boolean equals(Object obj) {
+ return quantity.equals(obj);
+ }
+
+ public float floatValue() {
+ return quantity.floatValue();
+ }
+
+ public int hashCode() {
+ return quantity.hashCode();
+ }
+
+ public int intValue() {
+ return quantity.intValue();
+ }
+
+ public long longValue() {
+ return quantity.longValue();
+ }
+
+ public short shortValue() {
+ return quantity.shortValue();
+ }
+
+ public String toString() {
+ return quantity.toString();
+ }
+
+}
Property changes on:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/src/org/smooks/OrderItem.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/xml/order.xml
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/xml/order.xml
(rev 0)
+++
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/xml/order.xml 2010-10-26
11:40:07 UTC (rev 26064)
@@ -0,0 +1,18 @@
+<order>
+ <header>
+ <date>Wed Nov 15 13:45:28 EST 2006</date>
+ <customer number="123123">Joe</customer>
+ </header>
+ <order-items>
+ <order-item>
+ <product>111</product>
+ <quantity>2</quantity>
+ <price>8.90</price>
+ </order-item>
+ <order-item>
+ <product>222</product>
+ <quantity>7</quantity>
+ <price>5.20</price>
+ </order-item>
+ </order-items>
+</order>
\ No newline at end of file
Property changes on:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/resource/xml/order.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/Copy of log4j.xml
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/Copy of log4j.xml
(rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/Copy of log4j.xml 2010-10-26
11:40:07 UTC (rev 26064)
@@ -0,0 +1,65 @@
+<?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" />
+ -->
+ <param name="ConversionPattern"
+ value="(%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
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/Copy of
log4j.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/log4j.xml
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/log4j.xml
(rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/log4j.xml 2010-10-26
11:40:07 UTC (rev 26064)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration
xmlns:log4j="http://jakarta.apache.org/log4j/">
+ <appender name="console"
class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%-5p %c{1} -
%m%n"/>
+ </layout>
+ </appender>
+
+ <root>
+ <priority value ="debug" />
+ <appender-ref ref="console" />
+ </root>
+
+</log4j:configuration>
\ No newline at end of file
Property changes on: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/log4j.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/test/Activator.java
===================================================================
---
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/test/Activator.java
(rev 0)
+++
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/test/Activator.java 2010-10-26
11:40:07 UTC (rev 26064)
@@ -0,0 +1,50 @@
+package org.jboss.tools.smooks.ui.bot.test;
+
+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.smooks.ui.bot.test";
//$NON-NLS-1$
+
+ // 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;
+ }
+
+}
Property changes on:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/test/Activator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/testcase/SmooksProject.java
===================================================================
---
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/testcase/SmooksProject.java
(rev 0)
+++
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/testcase/SmooksProject.java 2010-10-26
11:40:07 UTC (rev 26064)
@@ -0,0 +1,272 @@
+package org.jboss.tools.smooks.ui.bot.testcase;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.nio.channels.FileChannel;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
+import org.jboss.tools.smooks.ui.bot.test.Activator;
+import org.jboss.tools.smooks.ui.bot.tests.Project;
+import org.jboss.tools.smooks.ui.bot.tests.SmooksTest;
+import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
+import org.jboss.tools.ui.bot.ext.entity.JavaProjectEntity;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.helper.UserLibraryHelper;
+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.zest.SWTBotZestContextMenu;
+import org.jboss.tools.ui.bot.ext.zest.SWTBotZestGraph;
+import org.jboss.tools.ui.bot.ext.zest.SWTBotZestNode;
+import org.jboss.tools.ui.bot.ext.zest.SWTZestBot;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+(a)RunWith(SWTBotJunit4ClassRunner.class)
+public class SmooksProject extends SmooksTest {
+
+ boolean projectCreated = false;
+
+ /**
+ * Create Java Project as dependency for other tests
+ */
+ @Test
+ public void createProject() {
+ open.perspective(ActionItem.Perspective.JAVA.LABEL);
+
+ // Create Java Project
+ JavaProjectEntity projectEntity = new JavaProjectEntity();
+ projectEntity.setProjectName(Project.PROJECT_NAME);
+ eclipse.createJavaProject(projectEntity);
+
+ // Check if project is created
+ open.viewOpen(ActionItem.View.GeneralProjectExplorer.LABEL);
+ projectExplorer.selectProject(Project.PROJECT_NAME);
+ assertTrue(eclipse.isProjectInPackageExplorer(Project.PROJECT_NAME));
+
+
+ projectCreated = true;
+ }
+
+
+ /**
+ * Defines smooks user library inside
+ */
+ @Test
+ public void defineSmooksUserLibrary() {
+
+ String[] jarList = UserLibraryHelper.getJarList(Project.SMOOKS_PATH
+ + "/lib");
+ UserLibraryHelper.addUserLibrary("smooks-1.2.4", jarList);
+
+ // Check if library is defined TODO
+ }
+
+ /**
+ * Add Smooks User Library to Smooks project classpath
+ */
+ @Test
+ public void addSmooksUserLibraryToProject() {
+
+ // Open Project Properties
+ open.viewOpen(ActionItem.View.GeneralProjectExplorer.LABEL);
+ projectExplorer.selectProject(Project.PROJECT_NAME);
+ ContextMenuHelper.clickContextMenu(projectExplorer.tree(), "Properties");
+
+ // Add Library
+ eclipse.waitForShell("Properties for " + Project.PROJECT_NAME);
+ bot.tree().expandNode("Java Build Path").select();
+ bot.tabItem("Libraries").activate();
+ bot.button("Add Library...").click();
+ bot.list().select("User Library");
+ bot.clickButton(IDELabel.Button.NEXT);
+ bot.table().getTableItem(Project.SMOOKS_LIBNAME).check();
+ bot.clickButton(IDELabel.Button.FINISH);
+ bot.clickButton(IDELabel.Button.OK);
+ }
+
+ /**
+ * Ads java classes from resources for testing smoooks engine
+ */
+ @Test
+ public void addTestingJavaClasses() {
+
+ // Copy class files\
+ try {
+ copyFileFromResource(Project.PROJECT_NAME, "src", "org",
"smooks",
+ "Header.java");
+ copyFileFromResource(Project.PROJECT_NAME, "src", "org",
"smooks",
+ "OrderItem.java");
+ copyFileFromResource(Project.PROJECT_NAME, "src", "org",
"smooks",
+ "Order.java");
+ } catch (IOException e) {
+ log.error(e.getStackTrace());
+ fail("Unable to copy smooks classes resources");
+ }
+
+ projectExplorer.selectProject(Project.PROJECT_NAME);
+ ContextMenuHelper.clickContextMenu(projectExplorer.tree(), "Refresh");
+
+ open.viewOpen(ActionItem.View.JavaPackageExplorer.LABEL);
+
+ // Check file existence
+ assertTrue(packageExplorer.isFilePresent(Project.PROJECT_NAME,
"src","org.smooks","Header.java"));
+ assertTrue(packageExplorer.isFilePresent(Project.PROJECT_NAME,
"src","org.smooks","OrderItem.java"));
+ assertTrue(packageExplorer.isFilePresent(Project.PROJECT_NAME,
"src","org.smooks","Order.java"));
+ }
+
+ @Test
+ public void addTestingXMLFiles() {
+ // Copy class files
+ try {
+ copyFileFromResource(Project.PROJECT_NAME, "xml", "order.xml");
+ } catch (IOException e) {
+ log.error(e.getStackTrace());
+ fail("Unable to copy smooks xml resources");
+ }
+
+ open.viewOpen(ActionItem.View.GeneralProjectExplorer.LABEL);
+ projectExplorer.selectProject(Project.PROJECT_NAME);
+ ContextMenuHelper.clickContextMenu(projectExplorer.tree(), "Refresh");
+
+ open.viewOpen(ActionItem.View.JavaPackageExplorer.LABEL);
+
+ // Check file existence
+ assertTrue(packageExplorer.isFilePresent(Project.PROJECT_NAME,
"xml","order.xml"));
+ }
+
+ @Test
+ public void createSmooksConfig() {
+ SWTBotView view = open.viewOpen(ActionItem.View.JavaPackageExplorer.LABEL);
+
+
+ eclipse.selectTreeLocation(view.bot(),Project.PROJECT_NAME,"src");
+ eclipse.createNew(EntityType.SMOOKS_CONFIG);
+
+ open.finish(bot.activeShell().bot());
+
+ // check file
+ assertTrue(packageExplorer.isFilePresent(Project.PROJECT_NAME,
"src","smooks-config.xml"));
+ }
+
+
+ @Test
+ public void defineInputTask() {
+ //SWTGefBot gefBot = new SWTGefBot();
+ ///SWTBotGefEditor editor = gefBot.gefEditor("smooks-config.xml");
+
+ SWTZestBot zestBot = new SWTZestBot();
+ SWTBotZestGraph graph = zestBot.getZestGraph(0);
+
+ SWTBotZestNode node = graph.node("Input Task");
+ node.click();
+
+ bot.sleep(2000, "--------> Trying to click");
+
+ SWTBotZestContextMenu menu = node.contextMenu();
+ menu.clickMenu("Add Task","Java Mapping");
+
+ bot.sleep(2000, " Context menu on node clicke <------------");
+ graph.debugGraph();
+ bot.sleep(2000, " Check debug info");
+
+ // Select Order XML file
+ graph.node("Input Task").click();
+ bot.clickButton("Add");
+ bot.clickButton("Browse WorkSpace");
+ SWTBot shellBot = bot.shell("Select Files").bot();
+ eclipse.selectTreeLocation(shellBot, Project.PROJECT_NAME, "xml",
"order.xml");
+ bot.clickButton(IDELabel.Button.OK);
+ bot.clickButton(IDELabel.Button.FINISH);
+ bot.activeEditor().save();
+
+ SWTBotEditor editor;
+ graph.connection(graph.node("Input Task"),graph.node("Java
Mapping")).click();
+ bot.sleep(2000,"check if edge is clicked");
+ }
+
+
+ @Test
+ public void addJavaMapping() {
+
+ bot.sleep(1000);
+ SWTZestBot zestBot = new SWTZestBot();
+ SWTBotZestGraph graph = zestBot.getZestGraph(0);
+ graph.node("Java Mapping").click();
+ bot.sleep(2000, "Check java mapping");
+
+ bot.sleep(1000, "check widgets");
+ }
+
+ @Test
+ public void defineJavaMapping() {
+
+
+ }
+
+ @Test
+ public void removeProject() {
+
+ open.viewOpen(ActionItem.View.GeneralProjectExplorer.LABEL);
+ // Action
+ projectExplorer.deleteProject(Project.PROJECT_NAME, true);
+ util.waitForNonIgnoredJobs();
+ // Check
+ assertFalse(eclipse.isProjectInPackageExplorer(Project.PROJECT_NAME));
+ }
+
+ private void copyFileFromResource(String project, String... path)
+ throws IOException {
+
+ StringBuilder inBuilder = new StringBuilder();
+ StringBuilder outBuilder = new StringBuilder();
+
+ inBuilder.append(FileLocator.toFileURL(
+ Platform.getBundle(Activator.PLUGIN_ID).getEntry("/"))
+ .getFile());
+ inBuilder.append("resource");
+
+ outBuilder.append(Platform.getLocation() + File.separator);
+ outBuilder.append(project);
+
+ for (int i = 0; i < path.length; i++) {
+ inBuilder.append(File.separator);
+ inBuilder.append(path[i]);
+
+ outBuilder.append(File.separator);
+ outBuilder.append(path[i]);
+
+ // Create folder if doesn't exist
+ if ((path.length > 1) && (i == (path.length - 2))) {
+ File folder = new File(outBuilder.toString());
+ folder.mkdirs();
+ log.info("Folder created: " + outBuilder.toString());
+ }
+ }
+
+ File in = new File(inBuilder.toString());
+ File out = new File(outBuilder.toString());
+
+ FileChannel inChannel = null;
+ FileChannel outChannel = null;
+
+ inChannel = new FileInputStream(in).getChannel();
+ outChannel = new FileOutputStream(out).getChannel();
+
+ inChannel.transferTo(0, inChannel.size(), outChannel);
+
+ if (inChannel != null)
+ inChannel.close();
+ if (outChannel != null)
+ outChannel.close();
+ log.info("In file: " + inBuilder.toString() + " -> Out file: "
+ + outBuilder.toString());
+ }
+}
Property changes on:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/testcase/SmooksProject.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/Project.java
===================================================================
---
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/Project.java
(rev 0)
+++
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/Project.java 2010-10-26
11:40:07 UTC (rev 26064)
@@ -0,0 +1,10 @@
+package org.jboss.tools.smooks.ui.bot.tests;
+
+public class Project {
+ // Smooks project
+ public static final String PROJECT_NAME = "smookstest1";
+ public static final String SMOOKS_PATH = "/home/jpeterka/lib/smooks-1.2.4";
+ public static final String SMOOKS_LIBNAME = "smooks-1.2.4";
+
+
+}
Property changes on:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/Project.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksAllTests.java
===================================================================
---
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksAllTests.java
(rev 0)
+++
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksAllTests.java 2010-10-26
11:40:07 UTC (rev 26064)
@@ -0,0 +1,23 @@
+package org.jboss.tools.smooks.ui.bot.tests;
+
+import org.jboss.tools.smooks.ui.bot.testcase.SmooksProject;
+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( {SmooksProject.class})
+public class SmooksAllTests extends SmooksTest {
+
+ @BeforeClass
+ public static void setUpSuite() {
+ SmooksTest.prepare();
+ }
+
+ @AfterClass
+ public static void tearDownSuite() {
+ SmooksTest.clean();
+ }
+}
Property changes on:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksAllTests.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksTest.java
===================================================================
---
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksTest.java
(rev 0)
+++
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksTest.java 2010-10-26
11:40:07 UTC (rev 26064)
@@ -0,0 +1,17 @@
+package org.jboss.tools.smooks.ui.bot.tests;
+
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+
+
+public class SmooksTest extends SWTTestExt {
+
+ public static void prepare() {
+
+ eclipse.maximizeActiveShell();
+ bot.viewByTitle("Welcome").close();
+ }
+
+ public static void clean() {
+ bot.sleep(10000, "All Finished");
+ }
+}
Property changes on:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/tests/SmooksTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain