From 6226846598a3f758ea605d86ef90b3c72cb5af54 Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Sun, 31 May 2020 18:30:58 +0200 Subject: Fix imports and tests --- .../sevenwonders/server/controllers/GameBrowserControllerTest.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'sw-server/src') diff --git a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/GameBrowserControllerTest.kt b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/GameBrowserControllerTest.kt index d252e3f0..648c924b 100644 --- a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/GameBrowserControllerTest.kt +++ b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/GameBrowserControllerTest.kt @@ -4,7 +4,6 @@ import org.junit.Before import org.junit.Test import org.luxons.sevenwonders.model.api.actions.CreateGameAction import org.luxons.sevenwonders.model.api.actions.JoinGameAction -import org.luxons.sevenwonders.server.api.toDTO import org.luxons.sevenwonders.server.controllers.GameBrowserController.UserAlreadyInGameException import org.luxons.sevenwonders.server.repositories.LobbyRepository import org.luxons.sevenwonders.server.repositories.PlayerNotFoundException @@ -52,7 +51,7 @@ class GameBrowserControllerTest { assertFalse(games.isEmpty()) val lobby = games.iterator().next() assertEquals(lobby, createdLobby) - assertEquals(player.toDTO(), lobby.players[0]) + assertEquals(player.username, lobby.players[0].username) } @Test @@ -90,7 +89,7 @@ class GameBrowserControllerTest { val createGameAction = CreateGameAction("Test Game") val createdLobby = gameBrowserController.createGame(createGameAction, ownerPrincipal) - assertEquals(owner.toDTO(), createdLobby.players[0]) + assertEquals(owner.username, createdLobby.players[0].username) val joiner = playerRepository.createOrUpdate("testjoiner", "Test User Joiner") val joinerPrincipal = TestPrincipal("testjoiner") @@ -98,8 +97,8 @@ class GameBrowserControllerTest { val joinedLobby = gameBrowserController.joinGame(joinGameAction, joinerPrincipal) - assertEquals(owner.toDTO(), joinedLobby.players[0]) - assertEquals(joiner.toDTO(), joinedLobby.players[1]) + assertEquals(owner.username, joinedLobby.players[0].username) + assertEquals(joiner.username, joinedLobby.players[1].username) } @Test -- cgit