1 package org.jbpm.bpel.exe.state; 2 3 4 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 e) { return; } 31 fail("childrenCompensated can't be invoked at this state"); 32 } 33 } 34 | Popular Tags |