public void Test_StartGame_BoardStateIsPreFlop_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(); Assert.AreEqual(table.Board.BoardState, BoardStateType.Preflop); }
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!"); }
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); }
public void Test_StartGame_WithPlayers_HaveCards(int seatNumber) { 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(); bool expected = table.Players.ToList()[seatNumber].HasCards(); Assert.AreEqual(expected, true); }
public void Test_River_WhenInFlop_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(); table.Flop(); Exception exception = Assert.Throws <Exception>(() => table.River()); Assert.AreEqual(exception.Message, "The board has to go through Turn first!"); }