1 package org.jbpm.bpel.exe.state; 2 3 4 8 public class FaultChildrenAtHandlerTest extends AbstractStateTestCase { 9 10 public ScopeState getState() { 11 return FaultingState.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 34 public void testTerminate() { 35 ScopeState oldState = scope.getState(); 36 scope.terminate(); 37 assertEquals(oldState, scope.getState()); 38 } 39 } 40 | Popular Tags |