Esempio n. 1
0
        public void AfterSecondPlayerChecksNowTurn()
        {
            //Arrange
            var nfo = new ModularGameMock(new BlindModule(BlindTypeEnum.Blinds)).AfterPreflop();

            //Act
            nfo.CurrentPlayerChecks();
            nfo.CurrentPlayerChecks();

            //Assert
            Assert.AreEqual(3, nfo.Game.Table.BettingRoundId, "The game should now be in the Turn round");
        }
Esempio n. 2
0
        public void AtStartOfBettingFirstPlayerChecks()
        {
            //Arrange
            var nfo = new ModularGameMock(new BlindModule(BlindTypeEnum.Blinds)).AfterPreflop();

            //Act
            var res = nfo.CurrentPlayerChecks();

            //Assert
            Assert.AreEqual(true, res, "The first player should be allowed to call");
        }
Esempio n. 3
0
        public void AfterFirstPlayerCheckOnFlopRoundStillFlop()
        {
            //Arrange
            var nfo = new ModularGameMock(new BlindModule(BlindTypeEnum.Blinds)).AfterPreflop();

            //Act
            nfo.CurrentPlayerChecks();

            //Assert
            Assert.AreEqual(2, nfo.Game.Table.BettingRoundId, "The game should still be in the flop round");
        }
Esempio n. 4
0
        public void AfterPlayerBetShouldNotBeAbleToCheck()
        {
            //Arrange
            var nfo = new ModularGameMock(new BlindModule(BlindTypeEnum.Blinds)).AfterPreflop();

            nfo.CurrentPlayerRaisesMinimum();

            //Act
            var res = nfo.CurrentPlayerChecks();

            //Assert
            Assert.AreEqual(false, res, "The player should not be able to check after a bet");
        }
Esempio n. 5
0
        public void AtStartOfBettingFirstPlayerBetsOverMinimum()
        {
            //Arrange
            var nfo = new ModularGameMock(new BlindModule(BlindTypeEnum.Blinds)).AfterPreflop();

            nfo.CurrentPlayerChecks();

            //Act
            var res = nfo.CurrentPlayerPlays(nfo.Game.Table.MinRaiseAmountForPlayer(nfo.CurrentPlayer) + 1);

            //Assert
            Assert.AreEqual(true, res, "The player should be able to raise with more than the minimum");
        }
Esempio n. 6
0
        public void AtStartOfBettingFirstPlayerBetsMinimum()
        {
            //Arrange
            var nfo = new ModularGameMock(new BlindModule(BlindTypeEnum.Blinds)).AfterPreflop();

            nfo.CurrentPlayerChecks();

            //Act
            var res = nfo.CurrentPlayerRaisesMinimum();

            //Assert
            Assert.AreEqual(true, res, "The player should be able to raise with the minimum");
        }
Esempio n. 7
0
        public void AllIn()
        {
            //Arrange
            var nfo = new ModularGameMock(new BlindModule(BlindTypeEnum.Blinds)).AfterPreflop();

            if (nfo.CurrentPlayer == nfo.PoorestPlayer)
            {
                nfo.CurrentPlayerChecks();
            }
            nfo.CurrentPlayerPlays(nfo.PoorestPlayer.MoneySafeAmnt + 10);

            //Act
            var res = nfo.CurrentPlayerCalls();

            //Assert
            Assert.AreEqual(true, res, "The first player should be allowed to go all-in");
        }