Example #1
0
        public void ExpectNothingToHappenIfCommandNotMoveRobber(GameCommand command)
        {
            var turn = new Mock<IGameTurn>();
            var robber = CreateRobber();

            var state = new MoveRobberState(turn.Object, robber);
            state.AfterExecute(command);

            turn.Verify(t => t.SetState<RobberStealState>(), Times.Never);
        }
Example #2
0
        public void AfterRobberMoveTransitionToRobberStealingState()
        {
            var turn = new Mock<IGameTurn>();
            var robber = CreateRobber();

            var state = new MoveRobberState(turn.Object, robber);
            state.AfterExecute(GameCommand.MoveRobber);

            turn.Verify(t => t.SetState<RobberStealState>(), Times.Once);
        }