Example #1
0
        public void Test_Turn_AfterStartGame_ThrowsException()
        {
            Table table = new Table(4, 0);

            table.AddPlayer(new Player(500, 0));
            table.AddPlayer(new Player(500, 0));
            table.AddPlayer(new Player(500, 0));

            table.StartGame();

            Exception exception = Assert.Throws <Exception>(() => table.Turn());

            Assert.AreEqual(exception.Message, "The board has to go through Flop first!");
        }
Example #2
0
        public void Test_Turn_BoardStateIsTurn_IsTrue()
        {
            Table table = new Table(4, 0);

            table.AddPlayer(new Player(500, 0));
            table.AddPlayer(new Player(500, 0));
            table.AddPlayer(new Player(500, 0));

            table.StartGame();
            table.Flop();
            table.Turn();

            Assert.AreEqual(table.Board.BoardState, BoardStateType.Turn);
        }