Browse Source

Test.GetDrawCardDeck

main
fdai7906 11 months ago
parent
commit
1ee0fd37be
  1. 5
      src/main/java/de/hsfulda/onses/models/Game.java
  2. 14
      src/test/java/de/hsfulda/onses/GameTest.java

5
src/main/java/de/hsfulda/onses/models/Game.java

@ -19,4 +19,9 @@ public class Game {
public ArrayList<Card> getDrawCardDeck() {
return drawCardDeck;
}
public void addCardToDrawCardDeck(Card card) {
drawCardDeck.add(card);
}
}

14
src/test/java/de/hsfulda/onses/GameTest.java

@ -16,6 +16,18 @@ public class GameTest {
game.setLastPlayedCard(card);
assertEquals(card, answer);
assertEquals(game.getLastPlayedCard(), answer);
}
@Test
@DisplayName("GetDrawCardDeck")
public void GetDrawCardDeck() {
Game game = new Game();
Card card = new Card().setColor(Card.Color.RED).setValue(Card.Value.EIGHT);
Card answer = card;
game.addCardToDrawCardDeck(card);
assertEquals(game.getDrawCardDeck().getFirst(), answer);
}
}
Loading…
Cancel
Save