Пример #1
0
        public void RunToEnd_SetupHandHistoryScript_PlayersShouldGetCorrectCards()
        {
            HandHistory script = new HandHistory();

            var mock = new Mock<OmahaPlayer>();
            mock.Setup(p => p.Act()).Returns(PokerAction.CreateCallAction());

            script.ButtonSeat = 0;
            script.SmallBlindSeat = 1;
            script.SmallBlindAmount = 5;
            script.BigBlindSeat = 0;
            script.BigBlindAmount = 10;

            script.Players[0] = new HandHistoryPlayer("John", 2300, mock.Object);
            script.Players[1] = new HandHistoryPlayer("Billy", 2800, mock.Object);

            Card[] expected0 = new Card[] { new Card("8s"), new Card("3s"), new Card("Ad"), new Card("Jc") };
            Card[] expected1 = new Card[] { new Card("5s"), new Card("Js"), new Card("5h"), new Card("Qs") };

            script.Players[0].HoleCards = expected0;
            script.Players[1].HoleCards = expected1;

            OmahaHiLoHand hand = new OmahaHiLoHand(script);

            hand.SimulateNext();

            Assert.AreEqual(expected0, script.Players[0].HoleCards);
            Assert.AreEqual(expected1, script.Players[1].HoleCards);
        }