Browse Source

Test.PlaySevenPlayerDeck

main
fdai7906 11 months ago
parent
commit
d2f874a221
  1. 13
      src/test/java/de/hsfulda/onses/GameServiceTest.java

13
src/test/java/de/hsfulda/onses/GameServiceTest.java

@ -1,6 +1,7 @@
package de.hsfulda.onses; package de.hsfulda.onses;
import com.sun.jdi.ArrayReference;
import de.hsfulda.onses.models.Game; import de.hsfulda.onses.models.Game;
import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test; 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.models.Player;
import de.hsfulda.onses.services.GameService; import de.hsfulda.onses.services.GameService;
import java.util.ArrayList;
public class GameServiceTest { public class GameServiceTest {
@Test @Test
@DisplayName("playCardRedEight") @DisplayName("playCardRedEight")
@ -474,4 +477,14 @@ public class GameServiceTest {
assertTrue(answer); assertTrue(answer);
} }
@Test
@DisplayName("PlaySevenPlayerDeckIsNowBotDeck")
public void PlaySevenPlayerDeckIsNowBotDeck() {
GameService gameService = new GameService();
ArrayList<Card> botDeck = new ArrayList<>(gameService.getGame().getPlayerService().getPlayerList().getLast().getPlayerDeck());
gameService.playSeven();
ArrayList<Card> answer = new ArrayList<>(gameService.getGame().getPlayerService().getPlayerList().getFirst().getPlayerDeck());
assertEquals(botDeck, answer);
}
} }
Loading…
Cancel
Save