@Test public void test_GetHand() { ArrayList<Card> hand = new ArrayList<Card>(); hand.add(new CharCard("TestChar1")); hand.add(new CharCard("TestChar2")); hand.add(new CharCard("TestChar3")); Player player = new Player(Character.Miss_Scarlett); for (Card c : hand) { player.addToHand(c); } assertTrue(player.gethand().equals(hand)); }
@Test public void test_GuessDisprove() { CharCard charCard = new CharCard("TestChar"); WeaponCard weaponCard = new WeaponCard("TestWeapon"); RoomCard roomCard = new RoomCard("TestRoom"); ArrayList<Card> hand = new ArrayList<Card>(); hand.add(charCard); hand.add(weaponCard); hand.add(roomCard); Player player = new Player(Character.Miss_Scarlett); for (Card c : hand) { player.addToHand(c); } GuessTuple guess = new GuessTuple(charCard, weaponCard, roomCard); assertNotNull(player.checkGuess(guess)); }
@Test public void test_GetName() { Player player = new Player(Character.Miss_Scarlett, "Player name test"); assertEquals(Character.Miss_Scarlett, player.getCharacter()); assertEquals("Player name test", player.getName()); }