Skip to content

Commit

Permalink
Update GameServerTest.java
Browse files Browse the repository at this point in the history
  • Loading branch information
odo3990 authored Apr 30, 2024
1 parent 6cc4427 commit 5bed2d3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/test/java/wordsearch/GameServerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public class GameServerTest {

public void setUp() {
gameServer = new GameServerTest();
player1 = new Player("uuid1", null);
player2 = new Player("uuid2", null);
player1 = new PlayerTest("uuid1", null);
player2 = new PlayerTest("uuid2", null);
}


Expand All @@ -25,7 +25,7 @@ public void testAddPlayer() {


public void testAddLobby() {
Lobby lobby = new Lobby("lobbyUUID");
LobbyTest lobby = new LobbyTest("lobbyUUID");
gameServer.addLobby(lobby);
assertEquals(1, gameServer.getLobbies().size());
assertEquals(lobby, gameServer.getLobbies().get(0));
Expand All @@ -52,15 +52,15 @@ public void testIsNickUnique() {
public void testFindLobby() {
assertNotNull(gameServer.findLobby());
for (int i = 0; i < 4; i++) {
Player player = new Player("uuid" + i, null);
PlayerTest player = new PlayerTest("uuid" + i, null);
gameServer.addPlayer(player);
}
assertNotNull(gameServer.findLobby());
}


public void testGetLobbyByUUID() {
Lobby lobby = new Lobby("lobbyUUID");
LobbyTest lobby = new LobbyTest("lobbyUUID");
gameServer.addLobby(lobby);
assertEquals(lobby, gameServer.getLobbyByUUID("lobbyUUID"));
assertNull(gameServer.getLobbyByUUID("nonExistentUUID"));
Expand Down

0 comments on commit 5bed2d3

Please sign in to comment.