From e66487776d5035f0e4dbbce257c4e7bac0e86c1e Mon Sep 17 00:00:00 2001 From: Filip Szepielewicz Date: Fri, 13 Dec 2024 13:50:30 +0000 Subject: [PATCH] Delete ClientGameLogicTest.java --- .../game/client/ClientGameLogicTest.java | 123 ------------------ 1 file changed, 123 deletions(-) delete mode 100644 Projekte/monopoly/model/src/test/java/pp/monopoly/game/client/ClientGameLogicTest.java diff --git a/Projekte/monopoly/model/src/test/java/pp/monopoly/game/client/ClientGameLogicTest.java b/Projekte/monopoly/model/src/test/java/pp/monopoly/game/client/ClientGameLogicTest.java deleted file mode 100644 index d20e106..0000000 --- a/Projekte/monopoly/model/src/test/java/pp/monopoly/game/client/ClientGameLogicTest.java +++ /dev/null @@ -1,123 +0,0 @@ -package pp.monopoly.game.client; -/* -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import pp.monopoly.server.MonopolyServer; -import pp.monopoly.client.ClientSender; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.*; - -/** - * Tests the client-side logic of the Monopoly game. - */ -/* -public class ClientGameLogicTest { - - private ClientGameLogic logic; - - @Mock - private MonopolyServer serverMock; - - @Mock - private ClientSender clientSenderMock; - - @Before - public void setUp() { - MockitoAnnotations.openMocks(this); - logic = new ClientGameLogic(clientSenderMock); - } - - @Test - public void testEnterHostName() { - String hostName = "localhost"; - logic.setHostName(hostName); - - assertEquals("The hostname should be correctly set.", hostName, logic.getHostName()); - } - - @Test - public void testEnterPortNumber() { - int portNumber = 12345; - logic.setPortNumber(portNumber); - - assertEquals("The port number should be correctly set.", portNumber, logic.getPortNumber()); - } - - @Test - public void testCancelGameCreation() { - doNothing().when(clientSenderMock).returnToMainMenu(); - - logic.cancelGameCreation(); - - verify(clientSenderMock, times(1)).returnToMainMenu(); - } - - @Test - public void testEnterPlayerLobby() { - doNothing().when(clientSenderMock).enterLobby(); - - logic.enterLobby(); - - verify(clientSenderMock, times(1)).enterLobby(); - } - - @Test - public void testEnterStartingCapital() { - int startingCapital = 1500; - logic.setStartingCapital(startingCapital); - - assertEquals("The starting capital should be correctly set.", startingCapital, logic.getStartingCapital()); - } - - @Test - public void testIncreaseStartingCapital() { - logic.setStartingCapital(1500); - logic.increaseStartingCapital(); - - assertEquals("The starting capital should increase by 100.", 1600, logic.getStartingCapital()); - } - - @Test - public void testDecreaseStartingCapital() { - logic.setStartingCapital(1500); - logic.decreaseStartingCapital(); - - assertEquals("The starting capital should decrease by 100.", 1400, logic.getStartingCapital()); - } - - @Test - public void testDefaultPlayerName() { - logic.addPlayer("Player 1"); - - assertTrue("The player name should be correctly set.", logic.getPlayerNames().contains("Player 1")); - } - - @Test - public void testEnterDisplayName() { - String displayName = "JohnDoe"; - logic.setPlayerName(displayName); - - assertEquals("The display name should be correctly set.", displayName, logic.getPlayerName()); - } - - @Test - public void testDuplicateNameEntry() { - logic.addPlayer("Player 1"); - boolean result = logic.addPlayer("Player 1"); - - assertTrue("Duplicate names should not be allowed.", !result); - } - - @Test - public void testSelectPlayerColor() { - logic.addPlayer("Player 1"); - boolean result = logic.setPlayerColor("Player 1", "Red"); - - assertTrue("The player should be able to select an available color.", result); - } -} -*/ \ No newline at end of file