Example #1
0
        void TransitionTo(IState target)
        {
            CurrentState = target;

            CurrentState.ExecuteActions(_commandChannel);
        }
			public void ItShouldExecuteTheCommandsOnTheNewState(IState newState, [Frozen]ICommandChannel commandChannel, EventCodes eventCodes, Controller sut)
			{
				// Arrange

				// Act
				sut.HandleEventCode(eventCodes.NewStateEventCode);

				// Assert
				A.CallTo(() => newState.ExecuteActions(commandChannel)).MustHaveHappened(Repeated.Exactly.Once);
			}