Browse Source

test_AddMultipleCardsToPlayerDeck

main
fdai7793 11 months ago
parent
commit
954a1d75c5
  1. 18
      src/test/java/de/hsfulda/onses/PlayerTest.java

18
src/test/java/de/hsfulda/onses/PlayerTest.java

@ -25,4 +25,22 @@ public class PlayerTest {
// assert
assertEquals(testCard, firstCardPlayerDeck);
}
@Test
@DisplayName("AddMultipleCardsToPlayerDeck")
public void AddMultipleCardsToPlayerDeck() {
// arrange
Player player = new Player();
Card testCard1 = new Card().setColor(Card.Color.BLACK).setValue(Card.Value.FIVE);
Card testCard2 = new Card().setColor(Card.Color.YELLOW).setValue(Card.Value.FIVE);
// act
player.addCardToPlayerDeck(testCard1);
player.addCardToPlayerDeck(testCard2);
Card firstCardPlayerDeck = player.getPlayerDeck().getFirst();
Card secondCardPlayerDeck = player.getPlayerDeck().get(1);
// assert
assertEquals(testCard1, firstCardPlayerDeck);
assertEquals(testCard2, secondCardPlayerDeck);
}
}
Loading…
Cancel
Save