diff options
author | Joffrey Bion <joffrey.bion@booking.com> | 2020-05-31 18:30:58 +0200 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@booking.com> | 2020-05-31 18:30:58 +0200 |
commit | 6226846598a3f758ea605d86ef90b3c72cb5af54 (patch) | |
tree | 73517c52c579a8ce5e42849ae26a199fd7577404 /sw-server | |
parent | Use blueprint CSS from CDN instead of local copy (diff) | |
download | seven-wonders-6226846598a3f758ea605d86ef90b3c72cb5af54.tar.gz seven-wonders-6226846598a3f758ea605d86ef90b3c72cb5af54.tar.bz2 seven-wonders-6226846598a3f758ea605d86ef90b3c72cb5af54.zip |
Fix imports and tests
Diffstat (limited to 'sw-server')
-rw-r--r-- | sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/GameBrowserControllerTest.kt | 9 |
1 files changed, 4 insertions, 5 deletions
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 |