diff --git a/src/test/java/de/hsfulda/onses/PlayerServiceTest.java b/src/test/java/de/hsfulda/onses/PlayerServiceTest.java new file mode 100644 index 0000000..2ccdb19 --- /dev/null +++ b/src/test/java/de/hsfulda/onses/PlayerServiceTest.java @@ -0,0 +1,28 @@ + +package de.hsfulda.onses; + +import de.hsfulda.onses.services.PlayerService; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; + +import de.hsfulda.onses.models.Player; + +public class PlayerServiceTest { + + @Test + @DisplayName("addPlayerToPlayerList") + void addPlayerToPlayerList() + { + //arrange + Player input = new Player(); + Player expected = input; + // act + PlayerService playerservice = new PlayerService(); + playerservice.addPlayerToList(input); + Player answer = playerservice.getPlayerList().getFirst(); + // assert + assertEquals(expected, answer); + } + +}