From 1a3893fd8109a709efc7bb0ee79dbb2cad376da2 Mon Sep 17 00:00:00 2001 From: fdai7920 Date: Sun, 4 Feb 2024 20:54:09 +0100 Subject: [PATCH] refactoring: simplify DrawByChoiceTests --- src/test/java/de/hsfulda/onses/GameServiceTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/de/hsfulda/onses/GameServiceTest.java b/src/test/java/de/hsfulda/onses/GameServiceTest.java index 728f4b6..fde7519 100644 --- a/src/test/java/de/hsfulda/onses/GameServiceTest.java +++ b/src/test/java/de/hsfulda/onses/GameServiceTest.java @@ -250,7 +250,7 @@ public class GameServiceTest { GameService gameService = new GameService(); Card input = new Card().setColor(Card.Color.RED).setValue(Card.Value.ONE); - gameService.drawCard(gameService.getGame().getDrawCardDeck().size()); + gameService.getGame().getDrawCardDeck().clear(); gameService.getGame().getPlayerService().setCurrentTurn(true); gameService.getGame().setLastPlayedCard(new Card().setColor(Card.Color.GREEN).setValue(Card.Value.SEVEN)); gameService.getGame().addCardToDrawCardDeck(input); @@ -309,7 +309,7 @@ public class GameServiceTest { GameService gameService = new GameService(); Card input = new Card().setColor(Card.Color.RED).setValue(Card.Value.ONE); - gameService.drawCard(gameService.getGame().getDrawCardDeck().size()); + gameService.getGame().getDrawCardDeck().clear(); gameService.getGame().getPlayerService().setCurrentTurn(true); gameService.getGame().setLastPlayedCard(new Card().setColor(Card.Color.RED).setValue(Card.Value.SEVEN)); gameService.getGame().addCardToDrawCardDeck(input);