Browse Source

Test.CheckIfBotMovesAutomaticallyAfterPlayer

main
fdai7793 11 months ago
parent
commit
258c69122f
  1. 15
      src/test/java/de/hsfulda/onses/GameServiceTest.java

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

@ -459,4 +459,19 @@ public class GameServiceTest {
assertTrue(gameService.getTest());
}
@Test
@DisplayName("CheckIfBotMovesAutomaticallyAfterPlayer")
public void CheckIfBotMovesAutomaticallyAfterPlayer() {
GameService gameService = new GameService();
Card card = new Card().setColor(Card.Color.BLUE).setValue(Card.Value.ONE);
gameService.getGame().getPlayerService().getPlayerList().getLast().getPlayerDeck().add(new Card().setColor(Card.Color.BLUE).setValue(Card.Value.FIVE));
gameService.playCard(card);
boolean answer = gameService.getGame().getLastPlayedCard() != card;
assertTrue(answer);
}
}
Loading…
Cancel
Save