예제 #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");
        }
예제 #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");
        }
예제 #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");
        }
예제 #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");
        }
예제 #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");
        }
예제 #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");
        }
예제 #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");
        }