예제 #1
0
        public void AfterFirstBlindStateIsStillWaitForBlinds()
        {
            //Arrange
            var nfo = new ModularGameMock(new BlindModule(BlindTypeEnum.Blinds)).WithAllPlayersSeated();

            //Act
            nfo.PutBlinds(nfo.P1);

            //Assert
            Assert.AreEqual(GameStateEnum.WaitForBlinds, nfo.Game.State, "The game should still wait for blinds, missing the one from p2");
        }
예제 #2
0
        public void IfOnePlayerLeftDuringBlindsAndP2PostBlindStateIsWaitForPlayers()
        {
            //Arrange
            var nfo = new ModularGameMock(new BlindModule(BlindTypeEnum.Blinds)).WithAllPlayersSeated();

            nfo.Game.LeaveGame(nfo.P1);

            //Act
            nfo.PutBlinds(nfo.P2);

            //Assert
            Assert.AreEqual(GameStateEnum.WaitForPlayers, nfo.Game.State, "The game should now be waiting for players: p2 put his blind, the game started, p2 wins the pot, and the game goes back to waiting for players");
        }
예제 #3
0
        public void StartGameAndCheckNeededBlindP2AfterP1PutHis()
        {
            //Arrange
            var nfo = new ModularGameMock(new BlindModule(BlindTypeEnum.Blinds)).WithAllPlayersSeated();

            nfo.PutBlinds(nfo.P1);

            //Act
            var res = nfo.BlindNeeded(nfo.P2);

            //Assert
            Assert.AreNotEqual(0, res, "The game should still need a blind from p2");
        }