示例#1
0
 public void testStateEnter() {
   assertEquals("myState", state.getId());
   MockRequestControlContext context = new MockRequestControlContext(flow);
   state.enter(context);
   assertEquals(state, context.getCurrentState());
   assertTrue(entered);
 }
示例#2
0
 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());
 }