Browse Source

Test.DrawCardIntoPlayerDeck

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

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

@ -256,6 +256,19 @@ public class GameServiceTest {
int answer = before - after; int answer = before - after;
assertEquals(expected, answer); assertEquals(expected, answer);
} }
@Test
@DisplayName("DrawCardPlayerDeck")
public void DrawCardPlayerDeck() {
GameService gameService = new GameService();
gameService.getGame().getPlayerService().setCurrentTurn(true);
int before = gameService.getGame().getPlayerService().getPlayerList().getFirst().getPlayerDeck().size();
gameService.drawCard(4);
int after = gameService.getGame().getPlayerService().getPlayerList().getFirst().getPlayerDeck().size();
int expected = 4;
int answer = after - before;
assertEquals(expected, answer);
}
@Test @Test
@DisplayName("CheckThatBotDeckHasSevenCardsAfterGameStart") @DisplayName("CheckThatBotDeckHasSevenCardsAfterGameStart")

Loading…
Cancel
Save