1 package org.jbpm.bpel.exe.state; 2 3 4 8 public class FaultImplicitHandlerTest extends AbstractStateTestCase { 9 10 public ScopeState getState() { 11 return FaultingState.FAULTING_IMPLICITLY; 12 } 13 14 public void testChildrenCompensated() { 15 ((HandlingState)scope.getState()).childrenCompensated(scope); 16 17 assertEquals(EndedState.FAULTED, scope.getState()); 18 } 19 20 public void testChildrenCompensatedAtScope() { 21 TestInstance parent = createTestScope(root); 22 ((HandlingState)scope.getState()).childrenCompensated(scope); 23 24 assertEquals(EndedState.FAULTED, scope.getState()); 25 assertTrue(parent.childFaulted); 26 } 27 28 public void testFaulted() { 29 scope.faulted(null); 30 assertEquals(EndedState.FAULTED, scope.getState()); 31 } 32 33 public void testFaultedAtScope() { 34 TestInstance parent = createTestScope(root); 35 36 scope.faulted(null); 37 assertEquals(EndedState.FAULTED, scope.getState()); 38 assertTrue(parent.childFaulted); 39 } 40 41 public void testTerminate() { 42 ScopeState oldState = scope.getState(); 43 scope.terminate(); 44 assertEquals(oldState, scope.getState()); 45 } 46 47 } 48 | Popular Tags |