Author: psrna
Date: 2011-04-04 03:36:14 -0400 (Mon, 04 Apr 2011)
New Revision: 30261
Added:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/.project
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/.settings/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/.settings/org.eclipse.wst.common.component
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/bpelContent/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/bpelContent/SayHello.bpel
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/bpelContent/SayHelloArtifacts.wsdl
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/build.xml
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/messages/
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/messages/sayHello_request.xml
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/readme.txt
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/OdeDeployTest.java
Modified:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/WizardTest.java
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/suite/BPELAllTest.java
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/suite/BPELTest.java
Log:
* new BPEL SWTBot test
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/.project
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/.project
(rev 0)
+++
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/.project 2011-04-04
07:36:14 UTC (rev 30261)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>say_hello</name>
+ <comment></comment>
+ <projects>
+ <project>HelloWorld</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.bpel.validator.builder</name>
+ <arguments>
+ <dictionary>
+ <key>debug</key>
+ <value>false</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
Property changes on:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/.settings/org.eclipse.wst.common.component
===================================================================
---
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/.settings/org.eclipse.wst.common.component
(rev 0)
+++
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/.settings/org.eclipse.wst.common.component 2011-04-04
07:36:14 UTC (rev 30261)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="say_hello">
+ <wb-resource deploy-path="/"
source-path="/bpelContent"/>
+ <dependent-module deploy-path="/"
handle="module:/org.jboss.ide.eclipse.as.wtp.core.vcf.outputFolders/">
+ <dependency-type>consumes</dependency-type>
+ </dependent-module>
+ </wb-module>
+</project-modules>
Added:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
---
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/.settings/org.eclipse.wst.common.project.facet.core.xml
(rev 0)
+++
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/.settings/org.eclipse.wst.common.project.facet.core.xml 2011-04-04
07:36:14 UTC (rev 30261)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="jbt.bpel.facet.core"/>
+ <installed facet="jbt.bpel.facet.core" version="2.0"/>
+</faceted-project>
Property changes on:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/.settings/org.eclipse.wst.common.project.facet.core.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/bpelContent/SayHello.bpel
===================================================================
---
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/bpelContent/SayHello.bpel
(rev 0)
+++
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/bpelContent/SayHello.bpel 2011-04-04
07:36:14 UTC (rev 30261)
@@ -0,0 +1,81 @@
+<!-- HelloWorld BPEL Process [Generated by the Eclipse BPEL Designer] -->
+<bpel:process name="HelloWorld"
+
targetNamespace="http://www.jboss.org/bpel/examples"
+ suppressJoinFailure="yes"
+
xmlns:tns="http://www.jboss.org/bpel/examples"
+
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable...
+ >
+
+ <!-- Import the client WSDL -->
+ <bpel:import location="SayHelloArtifacts.wsdl"
namespace="http://www.jboss.org/bpel/examples"
+
importType="http://schemas.xmlsoap.org/wsdl/" />
+
+ <!-- ================================================================= -->
+ <!-- PARTNERLINKS -->
+ <!-- List of services participating in this BPEL process -->
+ <!-- ================================================================= -->
+ <bpel:partnerLinks>
+ <!-- The 'client' role represents the requester of this service.
-->
+ <bpel:partnerLink name="client"
+ partnerLinkType="tns:SayHello"
+ myRole="SayHelloProvider"
+ />
+ </bpel:partnerLinks>
+
+ <!-- ================================================================= -->
+ <!-- VARIABLES -->
+ <!-- List of messages and XML documents used within this BPEL process -->
+ <!-- ================================================================= -->
+ <bpel:variables>
+ <!-- Reference to the message passed as input during initiation -->
+ <bpel:variable name="ReceiveSayHelloVar"
+ messageType="tns:SayHelloRequestMessage"/>
+
+ <!--
+ Reference to the message that will be returned to the requester
+ -->
+ <bpel:variable name="ReplySayHelloVar"
+ messageType="tns:SayHelloResponseMessage"/>
+ </bpel:variables>
+
+ <!-- ================================================================= -->
+ <!-- ORCHESTRATION LOGIC -->
+ <!-- Set of activities coordinating the flow of messages across the -->
+ <!-- services integrated within this business process -->
+ <!-- ================================================================= -->
+ <bpel:sequence name="main">
+
+ <!-- Receive input from requester.
+ Note: This maps to operation defined in HelloWorld.wsdl
+ -->
+ <bpel:receive name="ReceiveSayHello" partnerLink="client"
+ portType="tns:SayHello"
+ operation="sayHello" variable="ReceiveSayHelloVar"
+ createInstance="yes"/>
+
+ <!-- Generate reply to synchronous request -->
+ <bpel:assign validate="no" name="AssignName">
+ <bpel:copy>
+ <bpel:from><bpel:literal><tns:HelloWorldResponse
xmlns:tns="http://www.jboss.org/bpel/examples"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <tns:result></tns:result>
+</tns:HelloWorldResponse>
+</bpel:literal></bpel:from>
+ <bpel:to variable="ReplySayHelloVar"
part="parameters"></bpel:to>
+ </bpel:copy>
+ <bpel:copy>
+ <bpel:from>
+ <![CDATA[concat('Hello ',
$ReceiveSayHelloVar.parameters/tns:input)]]>
+ </bpel:from>
+ <bpel:to part="parameters"
variable="ReplySayHelloVar">
+ <bpel:query
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath1.0"><![CDATA[tns:result]]></bpel:query>
+ </bpel:to>
+ </bpel:copy>
+ </bpel:assign>
+ <bpel:reply name="ReplySayHello"
+ partnerLink="client"
+ portType="tns:SayHello"
+ operation="sayHello"
+ variable="ReplySayHelloVar"
+ />
+ </bpel:sequence>
+</bpel:process>
\ No newline at end of file
Added:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/bpelContent/SayHelloArtifacts.wsdl
===================================================================
---
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/bpelContent/SayHelloArtifacts.wsdl
(rev 0)
+++
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/bpelContent/SayHelloArtifacts.wsdl 2011-04-04
07:36:14 UTC (rev 30261)
@@ -0,0 +1,90 @@
+<?xml version="1.0"?>
+<definitions name="SayHello"
+
targetNamespace="http://www.jboss.org/bpel/examples"
+
xmlns:tns="http://www.jboss.org/bpel/examples"
+
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+
+<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ TYPE DEFINITION - List of types participating in this BPEL process
+ The BPEL Designer will generate default request and response types
+ but you can define or import any XML Schema type and use them as part
+ of the message types.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <types>
+ <schema attributeFormDefault="unqualified"
elementFormDefault="qualified"
+
targetNamespace="http://www.jboss.org/bpel/examples"
+
xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="SayHelloRequest">
+ <complexType>
+ <sequence>
+ <element name="input" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="SayHelloResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </types>
+
+
+<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ MESSAGE TYPE DEFINITION - Definition of the message types used as
+ part of the port type defintions
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <message name="SayHelloRequestMessage">
+ <part name="parameters"
element="tns:SayHelloRequest"/>
+ </message>
+ <message name="SayHelloResponseMessage">
+ <part name="parameters"
element="tns:SayHelloResponse"/>
+ </message>
+
+<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ PORT TYPE DEFINITION - A port type groups a set of operations into
+ a logical service unit.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+
+ <!-- portType implemented by the HelloWorld BPEL process -->
+ <portType name="SayHello">
+ <operation name="sayHello">
+ <input message="tns:SayHelloRequestMessage" />
+ <output message="tns:SayHelloResponseMessage"/>
+ </operation>
+ </portType>
+
+
+<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ PARTNER LINK TYPE DEFINITION
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <plnk:partnerLinkType name="SayHello">
+ <plnk:role name="SayHelloProvider"
portType="tns:SayHello"/>
+ </plnk:partnerLinkType>
+
+ <binding name="SayHelloBinding" type="tns:SayHello">
+ <soap:binding style="document"
+
transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="sayHello">
+ <soap:operation
+
soapAction="http://www.jboss.org/bpel/examples/sayHello" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="SayHelloService">
+ <port name="SayHelloPort" binding="tns:SayHelloBinding">
+ <soap:address location="http://localhost:8080/SayHelloProcess" />
+ </port>
+ </service>
+</definitions>
Property changes on:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/bpelContent/SayHelloArtifacts.wsdl
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/build.xml
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/build.xml
(rev 0)
+++
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/build.xml 2011-04-04
07:36:14 UTC (rev 30261)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="say_hello_process" default="deploy"
basedir=".">
+ <description>${ant.project.name} ${line.separator}</description>
+<!-- Import the base Ant build script... -->
+ <property file="../conf/quickstarts.properties"/>
+ <property name="org.jboss.esb.server.home"
value="../../.."/>
+ <property name="org.jboss.esb.server.config"
value="default"/>
+ <property name="version" value="1"/>
+ <property name="server.dir"
value="${org.jboss.esb.server.home}/server/${org.jboss.esb.server.config}"/>
+ <property name="conf.dir" value="${server.dir}/conf"/>
+ <property name="deploy.dir" value="${server.dir}/deploy"/>
+ <property name="server.lib.dir" value="${server.dir}/lib"/>
+ <property name="sample.jar.name"
value="${ant.project.name}-${version}.jar"/>
+ <target name="deploy">
+ <echo>Deploy ${ant.project.name}</echo>
+ <jar basedir="bpelContent"
destfile="${deploy.dir}/${sample.jar.name}"/>
+ </target>
+ <target name="undeploy">
+ <echo>Undeploy ${ant.project.name}</echo>
+ <delete file="${deploy.dir}/${sample.jar.name}"/>
+ </target>
+ <target name="sayhello">
+ <echo>Send test message to: ${ant.project.name}</echo>
+ <java
classname="org.apache.ode.tools.sendsoap.cline.HttpSoapSender">
+ <arg value="http://localhost:8080/SayHelloProcess"/>
+ <arg value="messages/sayHello_request.xml"/>
+ <classpath>
+ <fileset dir="${org.jboss.esb.server.home}/client"
includes="*.jar"/>
+ <pathelement path="${java.class.path}"/>
+ </classpath>
+ </java>
+ </target>
+</project>
\ No newline at end of file
Property changes on:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/build.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/messages/sayHello_request.xml
===================================================================
---
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/messages/sayHello_request.xml
(rev 0)
+++
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/messages/sayHello_request.xml 2011-04-04
07:36:14 UTC (rev 30261)
@@ -0,0 +1,8 @@
+<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:exam="http://www.jboss.org/bpel/examples">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <exam:SayHelloRequest>
+ <exam:input>Dolly</exam:input>
+ </exam:SayHelloRequest>
+ </soapenv:Body>
+</soapenv:Envelope>
Property changes on:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/messages/sayHello_request.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/readme.txt
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/readme.txt
(rev 0)
+++
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/readme.txt 2011-04-04
07:36:14 UTC (rev 30261)
@@ -0,0 +1,28 @@
+Quickstart Examples - Level 1 - Say Hello
+============================================
+
+This example is simmilar to Hello World examples but uses input data
+to influence the output.
+
+The user calls the sayHello operation and provides his name. The process
+replys with 'Hello <name>'.
+
+To deploy the example, open a command line window in the example's folder,
+and simply type 'ant deploy'. To undeploy, use the command 'ant
undeploy'.
+
+To test the example, for example using the SOAPUI client, an example
+'sayHello' message can be found in the messages sub-folder, with the
+relevant WSDL being located in the bpel sub-folder.
+
+Alternatively, use the 'ant sayhello' command (from a command line window)
+to send the message.
+
+NOTE: The "ant deploy" command will by default deploy version 1 of the
+example to the server. If you wish to change the example, and redeploy,
+then you will need to update the version number in the build.xml, or
+override the version property, e.g. "ant -Dversion=2 deploy" (and similarly
+when undeploying "ant -Dversion=2 undeploy").
+
+Some handy URLs:
+http://localhost:8080/bpel-console is the BPEL console
+http://localhost:8080/SayHelloProcess?wsdl is the URL to the BPEL process' WSDL
Property changes on:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/projects/bpel_say_hello/readme.txt
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/OdeDeployTest.java
===================================================================
---
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/OdeDeployTest.java
(rev 0)
+++
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/OdeDeployTest.java 2011-04-04
07:36:14 UTC (rev 30261)
@@ -0,0 +1,89 @@
+package org.jboss.tools.bpel.ui.bot.test;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTabItem;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTableItem;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.bpel.ui.bot.test.suite.BPELTest;
+import org.jboss.tools.bpel.ui.bot.test.util.ResourceHelper;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.ui.bot.ext.view.PackageExplorer;
+import org.jboss.tools.ui.bot.ext.view.ProjectExplorer;
+import org.jboss.tools.ui.bot.ext.view.ServersView;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+@SWTBotTestRequires(perspective="BPEL Perspective")
+public class OdeDeployTest extends BPELTest {
+
+ static String BUNDLE = "org.jboss.tools.bpel.ui.bot.test";
+ ServersView sView = new ServersView();
+ ProjectExplorer projExplorer = new ProjectExplorer();
+
+ @Before
+ public void setupWorkspace() throws Exception {
+ ResourceHelper.importProject(BUNDLE, "/projects/bpel_say_hello",
"say_hello");
+ bot.viewByTitle("Project Explorer").setFocus();
+ projExplorer.selectProject("say_hello");
+ }
+
+ @Test
+ public void deployDescriptor() throws Exception {
+
+ IFile deployFile = createNewDeployDescriptor("say_hello");
+
+ bot.editorByTitle("deploy.xml").show();
+ bot.editorByTitle("deploy.xml").setFocus();
+ SWTBot editorBot = bot.editorByTitle("deploy.xml").bot();
+
+ SWTBotTable table = editorBot.table(0);
+ table.click(0, 1);
+ bot.sleep(TIME_1S);
+
+ editorBot.ccomboBox("-- none -- ").setSelection("SayHelloPort");
+ table.click(0, 2);
+ bot.editorByTitle("deploy.xml").save();
+
+ String deployContent = loadFile(deployFile);
+ Assert.assertTrue(deployContent != null);
+ Assert.assertTrue(deployContent.contains("<deploy
xmlns=\"http://www.apache.org/ode/schemas/dd/2007/03\"
xmlns:examples=\"http://www.jboss.org/bpel/examples\">"));
+ Assert.assertTrue(deployContent.contains("<process
name=\"examples:HelloWorld\">"));
+ Assert.assertTrue(deployContent.contains("<active>true</active>"));
+ Assert.assertTrue(deployContent.contains("<retired>false</retired>"));
+ Assert.assertTrue(deployContent.contains("<process-events
generate=\"all\"/>"));
+ Assert.assertTrue(deployContent.contains("<provide
partnerLink=\"client\">"));
+ Assert.assertTrue(deployContent.contains("<service
name=\"examples:SayHelloService\" port=\"SayHelloPort\"/>"));
+ Assert.assertTrue(deployContent.contains("</provide>"));
+ Assert.assertTrue(deployContent.contains("</process>"));
+ Assert.assertTrue(deployContent.contains("</deploy>"));
+
+ bot.sleep(TIME_10S);
+
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
Property changes on:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/OdeDeployTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/WizardTest.java
===================================================================
---
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/WizardTest.java 2011-04-04
05:57:52 UTC (rev 30260)
+++
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/WizardTest.java 2011-04-04
07:36:14 UTC (rev 30261)
@@ -126,31 +126,5 @@
return hasRuntime;
}
- String loadFile(IFile file) throws Exception {
- if(file.getType() != IFile.FILE) {
- throw new IllegalArgumentException("File: " + file.getFullPath().toString()
+ " is a directory!");
- }
-
- InputStream in = null;
- StringBuffer out;
- try {
- in = file.getContents();
- out = new StringBuffer();
- byte[] buffer = new byte[4 * 1024];
- int c = 0;
- while((c = in.read(buffer)) > -1) {
- out.append(new String(buffer, 0, c));
- }
- } finally {
- if(in != null) {
- try {
- in.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
- return out.length() == 0 ? null : out.toString();
- }
}
Modified:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/suite/BPELAllTest.java
===================================================================
---
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/suite/BPELAllTest.java 2011-04-04
05:57:52 UTC (rev 30260)
+++
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/suite/BPELAllTest.java 2011-04-04
07:36:14 UTC (rev 30261)
@@ -5,6 +5,7 @@
import org.jboss.tools.bpel.ui.bot.test.ActivityModelingTest;
import org.jboss.tools.bpel.ui.bot.test.AssignActivityTest;
import org.jboss.tools.bpel.ui.bot.test.FaultModelingTest;
+import org.jboss.tools.bpel.ui.bot.test.OdeDeployTest;
import org.jboss.tools.bpel.ui.bot.test.SimpleModelingTest;
import org.jboss.tools.bpel.ui.bot.test.WizardTest;
@@ -15,7 +16,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;
-@SuiteClasses({ WizardTest.class, ActivityModelingTest.class, /*
AssignActivityTest.class,*/ SimpleModelingTest.class, FaultModelingTest.class})
+(a)SuiteClasses({OdeDeployTest.class /*WizardTest.class, ActivityModelingTest.class,*/ /*
AssignActivityTest.class,*/ /*SimpleModelingTest.class, FaultModelingTest.class*/})
@RunWith(RequirementAwareSuite.class)
public class BPELAllTest extends TestSuite {
Modified:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/suite/BPELTest.java
===================================================================
---
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/suite/BPELTest.java 2011-04-04
05:57:52 UTC (rev 30260)
+++
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/src/org/jboss/tools/bpel/ui/bot/test/suite/BPELTest.java 2011-04-04
07:36:14 UTC (rev 30261)
@@ -1,5 +1,8 @@
package org.jboss.tools.bpel.ui.bot.test.suite;
+import java.io.IOException;
+import java.io.InputStream;
+
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -156,4 +159,32 @@
return iproject;
}
+
+ public String loadFile(IFile file) throws Exception {
+ if(file.getType() != IFile.FILE) {
+ throw new IllegalArgumentException("File: " + file.getFullPath().toString()
+ " is a directory!");
+ }
+
+ InputStream in = null;
+ StringBuffer out;
+ try {
+ in = file.getContents();
+ out = new StringBuffer();
+ byte[] buffer = new byte[4 * 1024];
+ int c = 0;
+ while((c = in.read(buffer)) > -1) {
+ out.append(new String(buffer, 0, c));
+ }
+ } finally {
+ if(in != null) {
+ try {
+ in.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+ }
+ return out.length() == 0 ? null : out.toString();
+ }
+
}