1 package org.jbpm.bpel.exe.state; 2 3 4 8 public class CompChildrenAtHandlerTest extends AbstractStateTestCase { 9 10 public ScopeState getState() { 11 return CompensatingState.TERMINATING_CHILDREN_AT_HANDLER; 12 } 13 14 public void testChildrenTerminated() { 15 scope.getState().childrenTerminated(scope); 16 17 assertEquals( EndedState.FAULTED, scope.getState() ); 18 } 19 20 public void testChildrenTerminatedAtScope() { 21 TestInstance parent = createTestScope(root); 22 scope.getState().childrenTerminated(scope); 23 24 assertEquals( EndedState.FAULTED, scope.getState() ); 25 assertTrue( parent.childFaulted ); 26 } 27 28 public void testChildrenCompensated() { 29 try { ((HandlingState)scope.getState()).childrenCompensated(scope); } 30 catch(IllegalStateException e) { return; } 31 fail("compensate can't be invoked at this state"); 32 } 33 } | Popular Tags |