diff --git a/spring-statemachine-core/src/test/java/org/springframework/statemachine/StateContextTests.java b/spring-statemachine-core/src/test/java/org/springframework/statemachine/StateContextTests.java index 31aedbd9..a59ffcd9 100644 --- a/spring-statemachine-core/src/test/java/org/springframework/statemachine/StateContextTests.java +++ b/spring-statemachine-core/src/test/java/org/springframework/statemachine/StateContextTests.java @@ -88,6 +88,12 @@ public class StateContextTests extends AbstractStateMachineTests { assertThat(listener.contexts.get(0).getStage(), is(Stage.EXTENDED_STATE_CHANGED)); assertThat(listener.contexts.get(1).getStage(), is(Stage.TRANSITION_START)); + assertThat(listener.contexts.get(1).getTransition(), notNullValue()); + assertThat(listener.contexts.get(1).getTransition().getSource(), nullValue()); + assertThat(listener.contexts.get(1).getTransition().getTarget(), notNullValue()); + assertThat(listener.contexts.get(1).getTransition().getTarget().getId(), is(States.S0)); + assertThat(listener.contexts.get(1).getSource(), nullValue()); + assertThat(listener.contexts.get(1).getTarget(), notNullValue()); assertThat(listener.contexts.get(2).getStage(), is(Stage.TRANSITION)); assertThat(listener.contexts.get(2).getTransition(), notNullValue()); @@ -110,7 +116,7 @@ public class StateContextTests extends AbstractStateMachineTests { assertThat(listener.contexts.get(6).getStage(), is(Stage.STATE_ENTRY)); assertThat(listener.contexts.get(6).getTarget(), notNullValue()); assertThat(listener.contexts.get(6).getTarget().getId(), is(States.S1)); -// assertThat(listener.contexts.get(6).getTransition(), notNullValue()); + assertThat(listener.contexts.get(6).getTransition(), notNullValue()); assertThat(listener.contexts.get(7).getStage(), is(Stage.TRANSITION_START)); @@ -119,7 +125,7 @@ public class StateContextTests extends AbstractStateMachineTests { assertThat(listener.contexts.get(9).getStage(), is(Stage.STATE_ENTRY)); assertThat(listener.contexts.get(9).getTarget(), notNullValue()); assertThat(listener.contexts.get(9).getTarget().getId(), is(States.S11)); -// assertThat(listener.contexts.get(9).getTransition(), notNullValue()); + assertThat(listener.contexts.get(9).getTransition(), notNullValue()); assertThat(listener.contexts.get(10).getStage(), is(Stage.STATE_CHANGED)); @@ -141,7 +147,7 @@ public class StateContextTests extends AbstractStateMachineTests { assertThat(listener.contexts.get(17).getTransition(), notNullValue()); assertThat(listener.contexts.get(18).getStage(), is(Stage.TRANSITION_END)); -// assertThat(listener.contexts.get(18).getTransition(), notNullValue()); + assertThat(listener.contexts.get(18).getTransition(), notNullValue()); } static class TestStateMachineListener extends StateMachineListenerAdapter {