1 package org.jbpm.bpel.exe.state; 2 3 4 8 public class CompImplicitHandlerTest extends AbstractStateTestCase { 9 10 public ScopeState getState() { 11 return CompensatingState.COMPENSATING_IMPLICITLY; 12 } 13 14 public void testChildrenCompensated() { 15 ((HandlingState)scope.getState()).childrenCompensated(scope); 16 17 assertEquals( EndedState.COMPENSATED, scope.getState() ); 18 } 19 20 public void testChildrenCompensatedAtScope() { 21 TestInstance parent = createTestScope(root); 22 ((HandlingState)scope.getState()).childrenCompensated(scope); 23 24 assertEquals( EndedState.COMPENSATED, scope.getState() ); 25 assertTrue( parent.childCompensated ); 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 assertFalse(parent.childCompensated); 39 assertTrue(parent.childFaulted); 40 } 41 } 42 | Popular Tags |