[seam-commits] Seam SVN: r13997 - in branches/enterprise/JBPAPP_5_0/src/test/integration: src/org/jboss/seam/test/integration and 1 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Tue Jan 18 06:53:16 EST 2011
Author: manaRH
Date: 2011-01-18 06:53:15 -0500 (Tue, 18 Jan 2011)
New Revision: 13997
Added:
branches/enterprise/JBPAPP_5_0/src/test/integration/resources/testProcess5.jpdl.xml
Modified:
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/BusinessProcessTest.java
branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/bpm/SeamExpressionEvaluatorTestController.java
Log:
JBPAPP-5517 adding test for exception handling
Added: branches/enterprise/JBPAPP_5_0/src/test/integration/resources/testProcess5.jpdl.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/integration/resources/testProcess5.jpdl.xml (rev 0)
+++ branches/enterprise/JBPAPP_5_0/src/test/integration/resources/testProcess5.jpdl.xml 2011-01-18 11:53:15 UTC (rev 13997)
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+
+<process-definition
+ name="OrderManagement"
+ xmlns="urn:jbpm.org:jpdl-3.2"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jbpm.org:jpdl-3.2 http://jbpm.org/xsd/jpdl-3.2.xsd"
+ >
+
+ <start-state name="start">
+ <transition to="process"/>
+ </start-state>
+
+ <task-node name="process" end-tasks="true">
+ <task name="ship" description="Ship order">
+ <assignment pooled-actors="#{shipperAssignment.pooledActors}"/>
+ </task>
+ <transition name="shipped" to="problem">
+ <action expression="#{afterShipping.log}"/>
+ </transition>
+ <transition name="cancel" to="cancelled"/>
+ </task-node>
+
+ <node name="problem">
+ <action expression="#{seamExpressionEvaluatorTestController.exceptionThrowing}"></action>
+ <transition to="complete" />
+ </node>
+
+ <end-state name="complete"/>
+ <end-state name="cancelled"/>
+
+</process-definition>
Modified: branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/BusinessProcessTest.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/BusinessProcessTest.java 2011-01-18 11:37:49 UTC (rev 13996)
+++ branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/BusinessProcessTest.java 2011-01-18 11:53:15 UTC (rev 13997)
@@ -43,7 +43,26 @@
}.run();
}
+ @Test
+ public void exceptionHandling() throws Exception
+ {
+ new FacesRequest(){
+
+ @Override
+ protected void invokeApplication() throws Exception
+ {
+ try {
+ invokeAction("#{seamExpressionEvaluatorTestController.createProcess5}");
+ assert false;
+ } catch (Exception e) {
+
+ }
+
+ }
+ }.run();
+ }
+
@Name("bpmTest")
static public class ProcessComponent {
@CreateProcess(definition="NoSuchProcess")
Modified: branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/bpm/SeamExpressionEvaluatorTestController.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/bpm/SeamExpressionEvaluatorTestController.java 2011-01-18 11:37:49 UTC (rev 13996)
+++ branches/enterprise/JBPAPP_5_0/src/test/integration/src/org/jboss/seam/test/integration/bpm/SeamExpressionEvaluatorTestController.java 2011-01-18 11:53:15 UTC (rev 13997)
@@ -31,6 +31,11 @@
{
}
+ @CreateProcess(definition="TestProcess5")
+ public void createProcess5()
+ {
+ }
+
public void logTrue()
{
System.out.println("true");
@@ -45,6 +50,11 @@
{
this.name = name;
}
+
+ public void exceptionThrowing()
+ {
+ throw new RuntimeException("Exception is thrown - test handling");
+ }
}
\ No newline at end of file
More information about the seam-commits
mailing list