Browse Source

refactoring: Improve TestShuffleDeck

main
fdai7906 11 months ago
parent
commit
2c8cc9cf41
  1. 7
      src/test/java/de/hsfulda/onses/GameServiceTest.java

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

@ -86,9 +86,14 @@ public class GameServiceTest {
notshuffled.fillDrawDeck();
shuffled.shuffleDeck();
for (int i = 0; i < 10; i++) {
int counter = 0;
for (int i = 0; i < 112; i++) {
if (shuffled.getGame().getDrawCardDeck().get(i).getValue() == notshuffled.getGame().getDrawCardDeck().get(i).getValue() &&
shuffled.getGame().getDrawCardDeck().get(i).getColor() == notshuffled.getGame().getDrawCardDeck().get(i).getColor()) {
counter ++;
}
if (counter == 112) {
fail("Deck wurde nicht richtig gemischt");
}
}

Loading…
Cancel
Save