public void PlayerLeftCommand() { var c = GameCommandMock.PlayerLeftCommand(); var dc = GetDecodedCommand(c); Assert.AreEqual(c.PlayerName, dc.PlayerName); }
public void GameStartedCommand() { var c = GameCommandMock.GameStartedCommand(); var dc = GetDecodedCommand(c); Assert.AreEqual(c.NeededBlindAmount, dc.NeededBlindAmount); }
public void PlayerSitOutCommand() { var c = GameCommandMock.PlayerSitOutCommand(); var dc = GetDecodedCommand(c); ComparePlayerSitOutCommand(c, dc); }
public void SeatUpdatedCommand() { var c = GameCommandMock.SeatUpdatedCommand(); var dc = GetDecodedCommand(c); CompareSeatInfo.Compare(c.Seat, dc.Seat); }
public void GameEndedCommand() { var c = GameCommandMock.GameEndedCommand(); var dc = GetDecodedCommand(c); Assert.AreEqual(c.CommandName, dc.CommandName); }
public void TableClosedCommand() { var c = GameCommandMock.TableClosedCommand(); var dc = GetDecodedCommand(c); Assert.AreEqual(c.CommandName, dc.CommandName); }
public void PlayerPlayMoneyCommand() { var c = GameCommandMock.PlayerPlayMoneyCommand(); var dc = GetDecodedCommand(c); Assert.AreEqual(c.AmountPlayed, dc.AmountPlayed); }
public void PlayerSitOutResponse() { var c = GameCommandMock.PlayerSitOutResponse(); var dc = GetDecodedResponse <PlayerSitOutResponse, PlayerSitOutCommand>(c); Assert.AreEqual(c.Success, dc.Success); ComparePlayerSitOutCommand(c.Command, dc.Command); }
public void BetTurnEndedCommand() { var c = GameCommandMock.BetTurnEndedCommand(); var dc = GetDecodedCommand(c); Assert.AreEqual(c.PotsAmounts.Count, dc.PotsAmounts.Count); Assert.IsFalse(c.PotsAmounts.Except(dc.PotsAmounts).Any()); }
public void PlayerDiscardActionCommand() { var c = GameCommandMock.PlayerDiscardActionCommand(); var dc = GetDecodedCommand(c); Assert.AreEqual(c.CardsDiscarded.Length, dc.CardsDiscarded.Length); Assert.IsFalse(c.CardsDiscarded.Except(dc.CardsDiscarded).Any()); }
public void DiscardRoundStartedCommand() { var c = GameCommandMock.DiscardRoundStartedCommand(); var dc = GetDecodedCommand(c); Assert.AreEqual(c.MaximumCardsToDiscard, dc.MaximumCardsToDiscard); Assert.AreEqual(c.MinimumCardsToDiscard, dc.MinimumCardsToDiscard); }
public void PlayerTurnBeganCommand() { var c = GameCommandMock.PlayerTurnBeganCommand(); var dc = GetDecodedCommand(c); Assert.AreEqual(c.NoSeat, dc.NoSeat); Assert.AreEqual(c.MinimumRaiseAmount, dc.MinimumRaiseAmount); }
public void PlayerSitInResponse() { var c = GameCommandMock.PlayerSitInResponse(); var dc = GetDecodedResponse <PlayerSitInResponse, PlayerSitInCommand>(c); Assert.AreEqual(c.NoSeat, dc.NoSeat); ComparePlayerSitInCommand(c.Command, dc.Command); }
public void BetTurnStartedCommand() { var c = GameCommandMock.BetTurnStartedCommand(); var dc = GetDecodedCommand(c); Assert.AreEqual(c.BettingRoundId, dc.BettingRoundId); Assert.AreEqual(c.Cards.Length, dc.Cards.Length); Assert.IsFalse(c.Cards.Except(dc.Cards).Any()); }
public void PlayerHoleCardsChangedCommand() { var c = GameCommandMock.PlayerHoleCardsChangedCommand(); var dc = GetDecodedCommand(c); Assert.AreEqual(c.NoSeat, dc.NoSeat); Assert.AreEqual(c.Cards.Length, dc.Cards.Length); Assert.IsFalse(c.Cards.Except(dc.Cards).Any()); Assert.AreEqual(c.PlayerState, dc.PlayerState); }
public void DiscardRoundEndedCommand() { var c = GameCommandMock.DiscardRoundEndedCommand(); var dc = GetDecodedCommand(c); Assert.AreEqual(c.CardsDiscarded.Length, dc.CardsDiscarded.Length); for (int i = 0; i < c.CardsDiscarded.Length; ++i) { CompareDiscardInfo.Compare(c.CardsDiscarded[i], dc.CardsDiscarded[i]); } }
public void GameStartedCommand() { var c = GameCommandMock.GameStartedCommand(); var dc = GetDecodedCommand(c); Assert.AreEqual(c.NeededBlindAmount, dc.NeededBlindAmount); Assert.AreEqual(c.Seats.Count, dc.Seats.Count); for (int i = 0; i < c.Seats.Count; ++i) { CompareSeatInfo.Compare(c.Seats[i], dc.Seats[i]); } }
public void GameMessageCommandRaisingCapped() { var c = GameCommandMock.GameMessageCommandRaisingCapped(); var dc = GetDecodedCommand(c); Assert.AreEqual(c.Message, dc.Message); var ci = (GameMessageOptionsRaisingCapped)c.Info; var dci = (GameMessageOptionsRaisingCapped)dc.Info; Assert.AreEqual(ci.OptionType, dci.OptionType); }
public void GameMessageCommandPlayerLeft() { var c = GameCommandMock.GameMessageCommandPlayerLeft(); var dc = GetDecodedCommand(c); Assert.AreEqual(c.Message, dc.Message); var ci = (GameMessageOptionPlayerLeft)c.Info; var dci = (GameMessageOptionPlayerLeft)dc.Info; Assert.AreEqual(ci.OptionType, dci.OptionType); Assert.AreEqual(ci.PlayerName, dci.PlayerName); }
public void GameMessageCommandGeneralInformation() { var c = GameCommandMock.GameMessageCommandGeneralInformation(); var dc = GetDecodedCommand(c); Assert.AreEqual(c.Message, dc.Message); var ci = (GameMessageOptionGeneralInformation)c.Info; var dci = (GameMessageOptionGeneralInformation)dc.Info; Assert.AreEqual(ci.OptionType, dci.OptionType); Assert.AreEqual(ci.Message, dci.Message); }
public void PlayerTurnEndedCommand() { var c = GameCommandMock.PlayerTurnEndedCommand(); var dc = GetDecodedCommand(c); Assert.AreEqual(c.NoSeat, dc.NoSeat); Assert.AreEqual(c.TotalPlayedMoneyAmount, dc.TotalPlayedMoneyAmount); Assert.AreEqual(c.TotalSafeMoneyAmount, dc.TotalSafeMoneyAmount); Assert.AreEqual(c.TotalPot, dc.TotalPot); Assert.AreEqual(c.ActionTakenType, dc.ActionTakenType); Assert.AreEqual(c.ActionTakenAmount, dc.ActionTakenAmount); Assert.AreEqual(c.PlayerState, dc.PlayerState); }
public void BetTurnStartedCommand() { var c = GameCommandMock.BetTurnStartedCommand(); var dc = GetDecodedCommand(c); Assert.AreEqual(c.BettingRoundId, dc.BettingRoundId); Assert.AreEqual(c.Cards.Length, dc.Cards.Length); Assert.IsFalse(c.Cards.Except(dc.Cards).Any()); Assert.AreEqual(c.Seats.Count, dc.Seats.Count); for (int i = 0; i < c.Seats.Count; ++i) { CompareSeatInfo.Compare(c.Seats[i], dc.Seats[i]); } }
public void PlayerWonPotCommand() { var c = GameCommandMock.PlayerWonPotCommand(); var dc = GetDecodedCommand(c); Assert.AreEqual(c.NoSeat, dc.NoSeat); Assert.AreEqual(c.PotId, dc.PotId); Assert.AreEqual(c.TotalPlayerMoney, dc.TotalPlayerMoney); Assert.AreEqual(c.WonAmount, dc.WonAmount); Assert.AreEqual(c.TotalPotAmount, dc.TotalPotAmount); Assert.AreEqual(c.WinningHand, dc.WinningHand); Assert.AreEqual(c.WinningCards.Length, dc.WinningCards.Length); for (int i = 0; i < c.WinningCards.Length; ++i) { Assert.AreEqual(c.WinningCards[i], dc.WinningCards[i]); } }
public void TableInfoCommand() { var c = GameCommandMock.TableInfoCommand(); var dc = GetDecodedCommand(c); CompareTableParams.Compare(c.Params, dc.Params); Assert.AreEqual(c.TotalPotAmount, dc.TotalPotAmount); Assert.AreEqual(c.PotsAmount.Count, dc.PotsAmount.Count); Assert.IsFalse(c.PotsAmount.Except(dc.PotsAmount).Any()); Assert.AreEqual(c.BoardCards.Length, dc.BoardCards.Length); Assert.IsFalse(c.BoardCards.Except(dc.BoardCards).Any()); Assert.AreEqual(c.Seats.Count, dc.Seats.Count); for (int i = 0; i < c.Seats.Count; ++i) { CompareSeatInfo.Compare(c.Seats[i], dc.Seats[i]); } Assert.AreEqual(c.GameHasStarted, dc.GameHasStarted); }
public void GameMessageCommandStudHighestHand() { var c = GameCommandMock.GameMessageCommandStudHighestHand(); var dc = GetDecodedCommand(c); Assert.AreEqual(c.Message, dc.Message); Assert.AreEqual(c.Info.OptionType, dc.Info.OptionType); var ci = (GameMessageOptionsStudHighestHand)c.Info; var dci = (GameMessageOptionsStudHighestHand)dc.Info; Assert.AreEqual(ci.OptionType, dci.OptionType); Assert.AreEqual(ci.PlayerName, dci.PlayerName); Assert.AreEqual(ci.HighestHand, dci.HighestHand); Assert.AreEqual(ci.Cards.Length, dci.Cards.Length); for (int i = 0; i < ci.Cards.Length; ++i) { Assert.AreEqual(ci.Cards[i], dci.Cards[i]); } }
public void TableClosedCommand() { var c = GameCommandMock.TableClosedCommand(); var dc = GetDecodedCommand(c); }
public void GameEndedCommand() { var c = GameCommandMock.GameEndedCommand(); var dc = GetDecodedCommand(c); }