KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jbpm > bpel > exe > state > TermChildrenAtHandlerTest


1 package org.jbpm.bpel.exe.state;
2
3
4 /**
5  * @author Juan Cantu
6  * @version $Revision: 1.3 $ $Date: 2005/06/16 19:15:35 $
7  */

8 public class TermChildrenAtHandlerTest extends AbstractStateTestCase {
9
10   public ScopeState getState() {
11     return TerminatingState.TERMINATING_CHILDREN_AT_HANDLER;
12   }
13   
14   public void testChildrenTerminated() {
15     scope.getState().childrenTerminated(scope);
16     
17     assertEquals( EndedState.TERMINATED, scope.getState() );
18   }
19   
20   public void testChildrenTerminatedAtScope() {
21     TestInstance parent = createTestScope(root);
22     scope.getState().childrenTerminated(scope);
23     
24     assertEquals( EndedState.TERMINATED, scope.getState() );
25     assertTrue( parent.childTerminated );
26   }
27   
28   public void testChildrenCompensated() {
29     try { ((HandlingState)scope.getState()).childrenCompensated(scope); }
30     catch(IllegalStateException JavaDoc e) { return; }
31     fail("childrenCompensated can't be invoked at this state");
32   }
33 }
34
Popular Tags