@Test public void testPokerPlayerSetnGetCard() { PokerPlayer testPlayer = new PokerPlayer(); // Testing setCardAtI() and getcard() testPlayer.setCardAtI(0, "FourClubs"); assertEquals("FourClubs", testPlayer.getCard(0).toString()); }
@Test public void testPokerPlayerSetPlayer() { PokerPlayer testPlayer = new PokerPlayer(); // Testing setPlayer() // extracts id and card info from string testPlayer.setPlayer("Player1 TwoHearts ThreeHearts FourHearts FiveHearts SixHearts"); assertEquals("Player1", testPlayer.getID()); assertEquals("TwoHearts", testPlayer.getCard(0).toString()); assertEquals("SixHearts", testPlayer.getCard(4).toString()); }