示例#1
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));
        }
示例#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);
        }
示例#3
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);
        }