From d2b1c0eefb417ea8f88e2a8e6a112298f5904091 Mon Sep 17 00:00:00 2001 From: fdai7906 Date: Wed, 7 Feb 2024 16:08:58 +0100 Subject: [PATCH] Test.GivePlayerName --- src/test/java/de/hsfulda/onses/PlayerTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/java/de/hsfulda/onses/PlayerTest.java b/src/test/java/de/hsfulda/onses/PlayerTest.java index fcdeeac..a803321 100644 --- a/src/test/java/de/hsfulda/onses/PlayerTest.java +++ b/src/test/java/de/hsfulda/onses/PlayerTest.java @@ -58,4 +58,14 @@ public class PlayerTest { assertEquals(expected, answer1); assertEquals(expected, answer2); } + + @Test + @DisplayName("GivePlayerName") + public void getPlayerName() { + Player player = new Player(); + String expected = "Spieler"; + player.setPlayerName(expected); + String answer = player.getPlayerName(); + assertEquals(expected, answer); + } }