diff --git a/src/test/java/de/hsfulda/onses/GameServiceTest.java b/src/test/java/de/hsfulda/onses/GameServiceTest.java index de47a5e..100ebff 100644 --- a/src/test/java/de/hsfulda/onses/GameServiceTest.java +++ b/src/test/java/de/hsfulda/onses/GameServiceTest.java @@ -1,6 +1,7 @@ package de.hsfulda.onses; +import com.sun.jdi.ArrayReference; import de.hsfulda.onses.models.Game; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -11,6 +12,8 @@ import de.hsfulda.onses.models.Card; import de.hsfulda.onses.models.Player; import de.hsfulda.onses.services.GameService; +import java.util.ArrayList; + public class GameServiceTest { @Test @DisplayName("playCardRedEight") @@ -474,4 +477,14 @@ public class GameServiceTest { assertTrue(answer); } + + @Test + @DisplayName("PlaySevenPlayerDeckIsNowBotDeck") + public void PlaySevenPlayerDeckIsNowBotDeck() { + GameService gameService = new GameService(); + ArrayList botDeck = new ArrayList<>(gameService.getGame().getPlayerService().getPlayerList().getLast().getPlayerDeck()); + gameService.playSeven(); + ArrayList answer = new ArrayList<>(gameService.getGame().getPlayerService().getPlayerList().getFirst().getPlayerDeck()); + assertEquals(botDeck, answer); + } }