private void Execute_Each_CardTurn_Of_All_Players(int quantitOfExecutionOfCardsTurn, int quantityExecutionOfPlayersCallBack) { Sut = new PlayersQuantityType(new Domain.Player.Players(ListOfPlayers.Select(x => x.Object))); var callback = new Mock <SelectedCardsConfirmationDelegate>(); callback.Setup(x => x(It.IsAny <IRacingCards>())).Returns(true); Enumerable.Range(0, quantitOfExecutionOfCardsTurn) .ToList() .ForEach(x => Sut.CardsTurn(callback.Object)); ListOfPlayers.ForEach(player => player.Verify(x => x.CardsTurn(callback.Object), Times.Exactly(quantityExecutionOfPlayersCallBack))); }
private void Give_One_Cards_Every_Player() { Sut = new PlayersQuantityType(new Domain.Player.Players(ListOfPlayers.Select(x => x.Object))); Sut.GiveCards(BetCards); ListOfPlayers.ForEach(player => player.Verify(x => x.GiveCard(It.IsAny <IBetCard>()), Times.Exactly(1))); }