From ce269d0555afd649c136756e41ea8b8ee865f434 Mon Sep 17 00:00:00 2001 From: RZ Date: Fri, 1 Dec 2023 23:35:48 -0500 Subject: [PATCH] Add bet and muck unit tests --- .../GGPokerHandSummaryParserExtraTests.cs | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/HandHistories.Parser.UnitTests/Parsers/FastParserTests/GGPoker/GGPokerHandSummaryParserExtraTests.cs b/HandHistories.Parser.UnitTests/Parsers/FastParserTests/GGPoker/GGPokerHandSummaryParserExtraTests.cs index 96dd3a4..0a0b51b 100644 --- a/HandHistories.Parser.UnitTests/Parsers/FastParserTests/GGPoker/GGPokerHandSummaryParserExtraTests.cs +++ b/HandHistories.Parser.UnitTests/Parsers/FastParserTests/GGPoker/GGPokerHandSummaryParserExtraTests.cs @@ -785,5 +785,80 @@ public void PaysCashoutFee() TestFullHandHistorySummary(expectedSummary, "PaysCashoutFee"); TestHandHistory(expectedHandHistory, "PaysCashoutFee"); } + + [Test] + public void BetAndMuck() + { + HandHistorySummary expectedSummary = new HandHistorySummary() + { + GameDescription = new GameDescriptor() + { + PokerFormat = PokerFormat.CashGame, + GameType = GameType.NoLimitHoldem, + Limit = Limit.FromSmallBlindBigBlind(0.02m, 0.05m, Currency.USD), + SeatType = SeatType.FromMaxPlayers(6), + Site = SiteName.GGPoker, + TableType = TableType.FromTableTypeDescriptions(TableTypeDescription.Regular) + }, + DateOfHandUtc = new DateTime(2019, 3, 18, 4, 12, 52), + DealerButtonPosition = 2, + HandId = HandID.From(52198761), + NumPlayersSeated = 3, + TableName = "NLHGold2", + TotalPot = 0.22m, + Rake = 0.01m, + Jackpot = 0, + Bingo = 0 + }; + + HandHistory expectedHandHistory = new HandHistory() + { + CommunityCards = BoardCards.FromCards("2d3ckdks7h"), + Players = new PlayerList(new List + { + new Player("42c6a201", 6.41m, 2), + new Player("Hero", 2.31m, 4, HoleCards.FromCards("2s5c")), + new Player("afv2fads3", 8.96m, 5, HoleCards.FromCards("Ah8d")), + }), + Hero = new Player("Hero", 2.31m, 4, HoleCards.FromCards("2s5c")), + RunItMultipleTimes = new RunItTwice[] + { + new RunItTwice + { + Board = BoardCards.FromCards("2d3ckdks7h"), + Actions = new List { }, + Winners = new List + { + new WinningsAction("afv2fads3", WinningsActionType.WINS, 0.21m, 0), + } + }, + new RunItTwice {}, + new RunItTwice {} + }, + Winners = new List() + { + new WinningsAction("afv2fads3", WinningsActionType.WINS, 0.21m, 0), + }, + HandActions = new List() { + new HandAction("Hero", HandActionType.SMALL_BLIND, -0.02m, Street.Preflop), + new HandAction("afv2fads3", HandActionType.BIG_BLIND, -0.05m, Street.Preflop), + new HandAction("42c6a201", HandActionType.CALL, 0.05m, Street.Preflop), + new HandAction("Hero", HandActionType.FOLD, 0, Street.Preflop), + new HandAction("afv2fads3", HandActionType.CHECK, 0, Street.Preflop), + new HandAction("afv2fads3", HandActionType.CHECK, 0, Street.Flop), + new HandAction("42c6a201", HandActionType.CHECK, 0, Street.Flop), + new HandAction("afv2fads3", HandActionType.CHECK, 0, Street.Turn), + new HandAction("42c6a201", HandActionType.CHECK, 0, Street.Turn), + new HandAction("afv2fads3", HandActionType.CHECK, 0, Street.River), + new HandAction("42c6a201", HandActionType.BET_AND_MUCK, 0.05m, Street.River), + new HandAction("afv2fads3", HandActionType.CALL, 0.05m, Street.River), + new HandAction("42c6a201", HandActionType.BET_AND_MUCK_FOLDS, 0m, Street.River), + new HandAction("afv2fads3", HandActionType.SHOW, 0, Street.Showdown), + }, + }; + + TestFullHandHistorySummary(expectedSummary, "BetAndMuck"); + TestHandHistory(expectedHandHistory, "BetAndMuck"); + } } }