diff --git a/src/test/java/de/hsfulda/onses/PlayerServiceTest.java b/src/test/java/de/hsfulda/onses/PlayerServiceTest.java index 2ccdb19..fc77680 100644 --- a/src/test/java/de/hsfulda/onses/PlayerServiceTest.java +++ b/src/test/java/de/hsfulda/onses/PlayerServiceTest.java @@ -24,5 +24,25 @@ public class PlayerServiceTest { // assert assertEquals(expected, answer); } + @Test + @DisplayName("addMultiplePlayerToPlayerList") + void addMultiplePlayerToPlayerList() + { + //arrange + Player input1 = new Player(); + Player expected1 = input1; + Player input2 = new Player(); + Player expected2 = input2; + // act + PlayerService playerservice = new PlayerService(); + playerservice.addPlayerToList(input1); + playerservice.addPlayerToList(input2); + + Player answer1 = playerservice.getPlayerList().getFirst(); + Player answer2 = playerservice.getPlayerList().get(1); + // assert + assertEquals(expected1, answer1); + assertEquals(expected2, answer2); + } }