|
|
@ -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<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); |
|
|
|
} |
|
|
|
} |