Ejemplo n.º 1
0
        public void Start_ChangeStates()
        {
            var state = MIDDLE();

            StateMachineTests <ISampleState>
            .For(state)
            .When(() => state.Start()).TransitionTo(MIDDLE).And()
            .When(() => state.First()).TransitionTo(MIDDLE).And()
            .When(() => state.Middle()).TransitionTo(MIDDLE).And()
            .When(() => state.Last()).TransitionTo(LAST).And()
            .When(() => state.End()).TransitionTo(MIDDLE)
            .Assert();
        }
Ejemplo n.º 2
0
        public void Start_ChangeStates()
        {
            var state = INITIALIZE();

            StateMachineTests <ISampleState>
            .For(state)
            .When(() => state.Start()).TransitionTo(START).And()
            .When(() => state.First()).TransitionTo(INITIALIZE).And()
            .When(() => state.Middle()).TransitionTo(INITIALIZE).And()
            .When(() => state.Last()).TransitionTo(INITIALIZE).And()
            .When(() => state.End()).TransitionTo(INITIALIZE)
            .Assert();
        }