diff --git a/src/test/java/de/hsfulda/onses/PlayerTest.java b/src/test/java/de/hsfulda/onses/PlayerTest.java index 9ce04fd..7dab45d 100644 --- a/src/test/java/de/hsfulda/onses/PlayerTest.java +++ b/src/test/java/de/hsfulda/onses/PlayerTest.java @@ -114,4 +114,15 @@ public class PlayerTest { player.setCurrentCard(card); assertEquals(card, player.getCurrentCard()); } + + @Test + @DisplayName("Set Player by Card") + void testPlayerSetByCard() { + Player player = new Player(); + Card card = new Card(); + + assertNull(card.getPlayer()); + player.addCardToPlayerDeck(card); + assertEquals(player, card.getPlayer()); + } }