From 96370f47c7e31822dfcffc32615b790c94e6ceea Mon Sep 17 00:00:00 2001 From: fdai7906 Date: Fri, 2 Feb 2024 18:17:33 +0100 Subject: [PATCH] Test.DrawCardDeckTest --- .../java/de/hsfulda/onses/GameServiceTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/test/java/de/hsfulda/onses/GameServiceTest.java b/src/test/java/de/hsfulda/onses/GameServiceTest.java index 1fb6e98..1012373 100644 --- a/src/test/java/de/hsfulda/onses/GameServiceTest.java +++ b/src/test/java/de/hsfulda/onses/GameServiceTest.java @@ -245,4 +245,18 @@ public class GameServiceTest { } + @Test + @DisplayName("DrawCardDeckTest") + public void DrawCardDeckTest () + { + GameService gameService = new GameService(); + int before = gameService.getGame().getDrawCardDeck().size(); + gameService.drawCard(4); + int after = gameService.getGame().getDrawCardDeck().size(); + + int expected = 4; + int answer = before - after; + assertEquals(expected, answer); + } + }