public void testStateEnter() { assertEquals("myState", state.getId()); MockRequestControlContext context = new MockRequestControlContext(flow); state.enter(context); assertEquals(state, context.getCurrentState()); assertTrue(entered); }
public void testStateEnterWithEntryAction() { TestAction action = new TestAction(); state.getEntryActionList().add(action); MockRequestControlContext context = new MockRequestControlContext(flow); state.enter(context); assertEquals(state, context.getCurrentState()); assertTrue(action.isExecuted()); assertTrue(entered); assertEquals(1, action.getExecutionCount()); }