From 67855c0c2c40cc8fb9c94cce91efcd836f860916 Mon Sep 17 00:00:00 2001 From: fdai7920 Date: Fri, 2 Feb 2024 15:36:06 +0100 Subject: [PATCH] Test.finalRelationsTest --- .../java/de/hsfulda/onses/GameServiceTest.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/test/java/de/hsfulda/onses/GameServiceTest.java b/src/test/java/de/hsfulda/onses/GameServiceTest.java index 02438e8..c76e1d4 100644 --- a/src/test/java/de/hsfulda/onses/GameServiceTest.java +++ b/src/test/java/de/hsfulda/onses/GameServiceTest.java @@ -169,4 +169,20 @@ public class GameServiceTest { // assert assertEquals(expected, answer); } + @Test + @DisplayName("allRelationsTest") + public void allRelationsTest () + { + // arrange + GameService expected = new GameService(); + //act + Player input1 = expected.getGame().getPlayerService().getPlayerList().getFirst(); + Player input2 = expected.getGame().getPlayerService().getPlayerList().getLast(); + GameService answer1 = input1.getPlayerService().getGame().getGameService(); + GameService answer2 = input2.getGame().getGameService(); + // assert + assertEquals(expected, answer1); + assertEquals(expected, answer2); + } + }