Browse Source

Test.DrawCardBotDeck

main
fdai7920 11 months ago
parent
commit
8daba2ef47
  1. 13
      src/test/java/de/hsfulda/onses/GameServiceTest.java

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

@ -243,6 +243,19 @@ public class GameServiceTest {
assertEquals(expected, answer);
}
@Test
@DisplayName("DrawCardPlayerDeckBot")
public void DrawCardPlayerDeckBot() {
GameService gameService = new GameService();
gameService.getGame().getPlayerService().setCurrentTurn(false);
int before = gameService.getGame().getPlayerService().getPlayerList().getLast().getPlayerDeck().size();
gameService.drawCard(2);
int after = gameService.getGame().getPlayerService().getPlayerList().getLast().getPlayerDeck().size();
int expected = 2;
int answer = after - before;
assertEquals(expected, answer);
}
@Test
@DisplayName("DrawCardDeckTest")

Loading…
Cancel
Save