public void ExpectSetStateRobberIfDiceResult7() { var dice = CreateDice(7); var turn = new Mock<IGameTurn>(); var state = new RollState(turn.Object, dice); state.AfterExecute(GameCommand.RollDice); turn.Verify(t => t.NextFlowState(), Times.Never); turn.Verify(t => t.SetState<RobberDiscardState>(), Times.Once); }
public void ExpectNothingToHappenIfStateNotStarted() { var dice = CreateDice(5); var turn = new Mock<IGameTurn>(); var state = new RollState(turn.Object, dice); dice.Roll(); turn.Verify(t => t.NextFlowState(), Times.Never); turn.Verify(t => t.SetState<RobberDiscardState>(), Times.Never); }
public void ExpectNothingToHappenIfCommandNotRollDice(GameCommand command) { var dice = CreateDice(7); var turn = new Mock<IGameTurn>(); var state = new RollState(turn.Object, dice); state.AfterExecute(command); turn.Verify(t => t.NextFlowState(), Times.Never); turn.Verify(t => t.SetState<RobberDiscardState>(), Times.Never); }