Browse Source

add test for player set card player

main^2
fdai7736 11 months ago
parent
commit
e56c680235
  1. 11
      src/test/java/de/hsfulda/onses/PlayerTest.java

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

@ -114,4 +114,15 @@ public class PlayerTest {
player.setCurrentCard(card); player.setCurrentCard(card);
assertEquals(card, player.getCurrentCard()); 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());
}
} }
Loading…
Cancel
Save