예제 #1
0
파일: TurnTest.cs 프로젝트: Corne/VOC
        public void ExpectAfterExectueToDelegateCallToCurrentState()
        {
            var player = new Mock<IPlayer>();
            var state1 = new Mock<ITurnState>();
            var provider = new Mock<IStateProvider>();
            provider.Setup(p => p.HasNext()).Returns(true);
            provider.Setup(p => p.GetNext()).Returns(state1.Object);

            var turn = new Turn(player.Object, provider.Object);
            turn.NextFlowState();
            turn.AfterExecute(GameCommand.RollDice);

            state1.Verify(s => s.AfterExecute(GameCommand.RollDice));
        }