Example #1
0
        public void ExpectNothingAfeter1RoadBuild()
        {
            var turn = new Mock<IGameTurn>();
            var state = new RoadBuildingState(turn.Object);

            state.AfterExecute(GameCommand.BuildRoad);

            turn.Verify(t => t.NextFlowState(), Times.Never);
        }
Example #2
0
        public void ExpectNothingFromOtherCommands(GameCommand command1, GameCommand command2)
        {
            var turn = new Mock<IGameTurn>();
            var state = new RoadBuildingState(turn.Object);

            state.AfterExecute(command1);
            state.AfterExecute(command2);

            turn.Verify(t => t.NextFlowState(), Times.Never);
        }
Example #3
0
        public void ExpectNextFlowStateAfterExecuteRoadBuildTwice()
        {
            var turn = new Mock<IGameTurn>();
            var state = new RoadBuildingState(turn.Object);

            state.AfterExecute(GameCommand.BuildRoad);
            state.AfterExecute(GameCommand.BuildRoad);

            turn.Verify(t => t.NextFlowState(), Times.Exactly(1));
        }