Author: Grid.Qian
Date: 2009-06-25 04:10:11 -0400 (Thu, 25 Jun 2009)
New Revision: 16197
Added:
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.project
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.settings/
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorld.bpel
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorld.bpelex
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorldArtifacts.wsdl
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/deploy.xml
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/editor/
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/editor/JBossBPELEditorTest.java
Removed:
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/tests/
Modified:
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/.project
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/META-INF/MANIFEST.MF
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/Activator.java
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/BpelUIAllTests.java
Log:
JBIDE-4502: add a test for bpel ui
Modified: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/.project
===================================================================
--- trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/.project 2009-06-25 00:18:37 UTC (rev
16196)
+++ trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/.project 2009-06-25 08:10:11 UTC (rev
16197)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.jboss.tools.bpel.ui.tests</name>
+ <name>org.jboss.tools.bpel.ui.test</name>
<comment></comment>
<projects>
</projects>
Modified: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/META-INF/MANIFEST.MF
===================================================================
--- trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/META-INF/MANIFEST.MF 2009-06-25
00:18:37 UTC (rev 16196)
+++ trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/META-INF/MANIFEST.MF 2009-06-25
08:10:11 UTC (rev 16197)
@@ -1,12 +1,16 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: org.jboss.tools.bpel.ui.tests
-Bundle-SymbolicName: org.jboss.tools.bpel.ui.tests
+Bundle-Name: org.jboss.tools.bpel.ui.test
+Bundle-SymbolicName: org.jboss.tools.bpel.ui.test
Bundle-Version: 1.0.0
-Bundle-Activator: org.jboss.tools.bpel.ui.tests.Activator
+Bundle-Activator: org.jboss.tools.bpel.ui.test.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.junit;bundle-version="3.8.2"
+ org.junit;bundle-version="3.8.2",
+ org.jboss.tools.common.test;bundle-version="2.0.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: JBoss, a division of Red Hat
+Import-Package: org.eclipse.core.resources,
+ org.eclipse.ui.ide,
+ org.jboss.tools.common.test.util
Added: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.project
===================================================================
--- trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.project
(rev 0)
+++ trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.project 2009-06-25
08:10:11 UTC (rev 16197)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>ODE_Test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</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.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
Property changes on:
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
---
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.settings/org.eclipse.wst.common.project.facet.core.xml
(rev 0)
+++
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.settings/org.eclipse.wst.common.project.facet.core.xml 2009-06-25
08:10:11 UTC (rev 16197)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="Apache Ode 1.x Runtime"/>
+ <installed facet="bpel.facet.core" version="2.0"/>
+</faceted-project>
Property changes on:
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/.settings/org.eclipse.wst.common.project.facet.core.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorld.bpel
===================================================================
--- trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorld.bpel
(rev 0)
+++
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorld.bpel 2009-06-25
08:10:11 UTC (rev 16197)
@@ -0,0 +1,83 @@
+<!-- HelloWorld BPEL Process [Generated by the Eclipse BPEL Designer] -->
+<bpel:process name="HelloWorld"
+
targetNamespace="http://eclipse.org/bpel/sample"
+ suppressJoinFailure="yes"
+
+
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable...
+
xmlns:ns1="http://eclipse.org/bpel/sample">
+
+ <!-- Import the client WSDL -->
+ <bpel:import location="HelloWorldArtifacts.wsdl"
namespace="http://eclipse.org/bpel/sample"
+
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="ns1:HelloWorld"
myRole="HelloWorldProvider"/>
+ </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="input"
+ messageType="tns:HelloWorldRequestMessage"/>
+
+ <!--
+ Reference to the message that will be returned to the requester
+ -->
+ <bpel:variable name="output"
+ messageType="tns:HelloWorldResponseMessage"/>
+ </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="receiveInput" partnerLink="client"
+ portType="tns:HelloWorld"
+ operation="process" variable="input"
+ createInstance="yes"/>
+
+ <!-- Generate reply to synchronous request -->
+ <bpel:assign validate="no" name="Assign">
+ <bpel:copy>
+ <bpel:from>
+ <bpel:literal
xml:space="preserve"><tns:HelloWorldResponse
xmlns:tns="http://eclipse.org/bpel/sample"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <tns:result></tns:result>
+</tns:HelloWorldResponse>
+</bpel:literal>
+ </bpel:from>
+ <bpel:to part="payload"
variable="output"></bpel:to>
+ </bpel:copy>
+ <bpel:copy>
+ <bpel:from>
+ <![CDATA[concat("Hello ",
$input.payload/tns:input)]]>
+ </bpel:from>
+ <bpel:to part="payload" variable="output">
+ </bpel:to>
+ </bpel:copy>
+
+ </bpel:assign>
+ <bpel:reply name="replyOutput"
+ partnerLink="client"
+ portType="tns:HelloWorld"
+ operation="process"
+ variable="output"
+ />
+ </bpel:sequence>
+</bpel:process>
+
Added:
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorld.bpelex
===================================================================
--- trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorld.bpelex
(rev 0)
+++
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorld.bpelex 2009-06-25
08:10:11 UTC (rev 16197)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ASCII"?>
+<extensionmodel:ExtensionMap xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:extensionmodel="http:///extensionmodel.ecore"
xmlns:org.eclipse.bpel.ui.uiextensionmodel="http:///org/eclipse/bpel/ui/uiextensionmodel.ecore"
namespace="http://org.eclipse.bpel.ui/">
+ <extensions>
+ <extendedObject href="HelloWorld.bpel#//@variables/(a)children.0"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="HelloWorld.bpel#//@variables/(a)children.1"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:VariableExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="HelloWorld.bpel#//@activity"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="HelloWorld.bpel#//@activity/(a)activities.0"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="HelloWorld.bpel#/"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ProcessExtension"
modificationStamp="1245829716000"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="HelloWorld.bpel#//@activity/(a)activities.1"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject
href="HelloWorld.bpel#//@activity/@activities.1/(a)copy.1"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:CopyExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject
href="HelloWorld.bpel#//@activity/@activities.1/(a)copy.0"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:CopyExtension"/>
+ </extensions>
+ <extensions>
+ <extendedObject href="HelloWorld.bpel#//@activity/(a)activities.2"/>
+ <extensionObject
xsi:type="org.eclipse.bpel.ui.uiextensionmodel:ActivityExtension"/>
+ </extensions>
+</extensionmodel:ExtensionMap>
Added:
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorldArtifacts.wsdl
===================================================================
---
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorldArtifacts.wsdl
(rev 0)
+++
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorldArtifacts.wsdl 2009-06-25
08:10:11 UTC (rev 16197)
@@ -0,0 +1,90 @@
+<?xml version="1.0"?>
+<definitions name="HelloWorld"
+
targetNamespace="http://eclipse.org/bpel/sample"
+
xmlns:tns="http://eclipse.org/bpel/sample"
+
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://eclipse.org/bpel/sample"
+
xmlns="http://www.w3.org/2001/XMLSchema">
+
+ <element name="HelloWorldRequest">
+ <complexType>
+ <sequence>
+ <element name="input" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="HelloWorldResponse">
+ <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="HelloWorldRequestMessage">
+ <part name="payload" element="tns:HelloWorldRequest"/>
+ </message>
+ <message name="HelloWorldResponseMessage">
+ <part name="payload"
element="tns:HelloWorldResponse"/>
+ </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="HelloWorld">
+ <operation name="process">
+ <input message="tns:HelloWorldRequestMessage" />
+ <output message="tns:HelloWorldResponseMessage"/>
+ </operation>
+ </portType>
+
+
+<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ PARTNER LINK TYPE DEFINITION
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <plnk:partnerLinkType name="HelloWorld">
+ <plnk:role name="HelloWorldProvider"
portType="tns:HelloWorld"/>
+ </plnk:partnerLinkType>
+
+ <binding name="HelloWorldSOAPBinding"
type="tns:HelloWorld">
+ <soap:binding style="document"
+
transport="http://schemas.xmlsoap.org/soap/http" />
+ <operation name="process">
+ <soap:operation
+
soapAction="http://eclipse.org/bpel/sample/process" />
+ <input>
+ <soap:body use="literal" />
+ </input>
+ <output>
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <service name="HelloWorldProcessService">
+ <port name="HelloWorldProcessPort"
binding="tns:HelloWorldSOAPBinding">
+ <soap:address location="
http://localhost:8080/ode/processes/HelloWorld" />
+ </port>
+ </service>
+</definitions>
Property changes on:
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/HelloWorldArtifacts.wsdl
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/deploy.xml
===================================================================
--- trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/deploy.xml
(rev 0)
+++
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/deploy.xml 2009-06-25
08:10:11 UTC (rev 16197)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deploy
xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
xmlns:sample="http://eclipse.org/bpel/sample">
+ <process name="sample:HelloWorld">
+ <process-events generate="all"/>
+ <provide partnerLink="client">
+ <service name="sample:HelloWorldProcessService"
port="HelloWorldProcessPort"/>
+ </provide>
+ </process>
+</deploy>
\ No newline at end of file
Property changes on:
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/projects/ODE_Test/deploy.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test
(from rev 16170,
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/tests)
Modified:
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/Activator.java
===================================================================
---
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/tests/Activator.java 2009-06-24
06:47:39 UTC (rev 16170)
+++
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/Activator.java 2009-06-25
08:10:11 UTC (rev 16197)
@@ -1,4 +1,4 @@
-package org.jboss.tools.bpel.ui.tests;
+package org.jboss.tools.bpel.ui.test;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -9,7 +9,7 @@
public class Activator extends AbstractUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.jboss.tools.bpel.ui.tests";
+ public static final String PLUGIN_ID = "org.jboss.tools.bpel.ui.test";
// The shared instance
private static Activator plugin;
Modified:
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/BpelUIAllTests.java
===================================================================
---
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/tests/BpelUIAllTests.java 2009-06-24
06:47:39 UTC (rev 16170)
+++
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/BpelUIAllTests.java 2009-06-25
08:10:11 UTC (rev 16197)
@@ -1,15 +1,19 @@
-package org.jboss.tools.bpel.ui.tests;
+package org.jboss.tools.bpel.ui.test;
+import org.jboss.tools.bpel.ui.test.editor.JBossBPELEditorTest;
+
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
public class BpelUIAllTests extends TestCase {
- public static final String PLUGIN_ID = "org.jboss.tools.bpel.ui.tests";
+ public static final String PLUGIN_ID = "org.jboss.tools.bpel.ui.test";
public static Test suite ()
{
TestSuite suite = new TestSuite(BpelUIAllTests.class.getName());
+
+ suite.addTestSuite(JBossBPELEditorTest.class);
return suite;
}
}
Added:
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/editor/JBossBPELEditorTest.java
===================================================================
---
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/editor/JBossBPELEditorTest.java
(rev 0)
+++
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/editor/JBossBPELEditorTest.java 2009-06-25
08:10:11 UTC (rev 16197)
@@ -0,0 +1,60 @@
+package org.jboss.tools.bpel.ui.test.editor;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+import org.jboss.tools.common.test.util.TestProjectProvider;
+
+
+import junit.framework.TestCase;
+
+public class JBossBPELEditorTest extends TestCase{
+
+ static String bpelFileName = "HelloWorld.bpel";
+ IProject fproject;
+ IFile bpelFile;
+ static String BUNDLE = "org.jboss.tools.bpel.ui.test";
+
+ public void setUp() throws Exception {
+ super.setUp();
+
+ //create jboss bpel project
+ fproject = createProject("ODE_Test");
+ bpelFile = fproject.getProject().getFile(bpelFileName);
+ assertTrue(bpelFile.exists());
+ }
+ public void tearDown() throws Exception {
+ super.tearDown();
+
+
+ }
+
+ public void testOpenEditor(){
+ IEditorPart bpelEditor = openEditor(bpelFile.getFullPath().toString());
+ assertNotNull(bpelEditor);
+ }
+
+ public IProject createProject(String prjName) throws CoreException {
+ TestProjectProvider provider = new TestProjectProvider(BUNDLE, "/projects/" +
prjName,
+ prjName, true);
+ IProject prj = provider.getProject();
+ assertNotNull(prj);
+ return prj;
+ }
+
+ public static IEditorPart openEditor(String inputFile) {
+ IEditorPart part = null;
+ try {
+ part =
IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(),ResourcesPlugin.getWorkspace().getRoot().getFile(new
Path(inputFile)));
+ } catch (PartInitException e) {
+ e.printStackTrace();
+ }
+ return part;
+ }
+}
Property changes on:
trunk/bpel/tests/org.eclipse.tools.bpel.ui.tests/src/org/jboss/tools/bpel/ui/test/editor/JBossBPELEditorTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain