Browse Source

refactoring: simplify DrawByChoiceTests

main
fdai7920 11 months ago
parent
commit
1a3893fd81
  1. 4
      src/test/java/de/hsfulda/onses/GameServiceTest.java

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

@ -250,7 +250,7 @@ public class GameServiceTest {
GameService gameService = new GameService(); GameService gameService = new GameService();
Card input = new Card().setColor(Card.Color.RED).setValue(Card.Value.ONE); 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().getPlayerService().setCurrentTurn(true);
gameService.getGame().setLastPlayedCard(new Card().setColor(Card.Color.GREEN).setValue(Card.Value.SEVEN)); gameService.getGame().setLastPlayedCard(new Card().setColor(Card.Color.GREEN).setValue(Card.Value.SEVEN));
gameService.getGame().addCardToDrawCardDeck(input); gameService.getGame().addCardToDrawCardDeck(input);
@ -309,7 +309,7 @@ public class GameServiceTest {
GameService gameService = new GameService(); GameService gameService = new GameService();
Card input = new Card().setColor(Card.Color.RED).setValue(Card.Value.ONE); 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().getPlayerService().setCurrentTurn(true);
gameService.getGame().setLastPlayedCard(new Card().setColor(Card.Color.RED).setValue(Card.Value.SEVEN)); gameService.getGame().setLastPlayedCard(new Card().setColor(Card.Color.RED).setValue(Card.Value.SEVEN));
gameService.getGame().addCardToDrawCardDeck(input); gameService.getGame().addCardToDrawCardDeck(input);

Loading…
Cancel
Save