summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/cards/Cards.kt1
-rw-r--r--sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/GameBrowserControllerTest.kt9
2 files changed, 4 insertions, 6 deletions
diff --git a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/cards/Cards.kt b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/cards/Cards.kt
index b0e73ed5..f26baf0e 100644
--- a/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/cards/Cards.kt
+++ b/sw-common-model/src/commonMain/kotlin/org/luxons/sevenwonders/model/cards/Cards.kt
@@ -1,7 +1,6 @@
package org.luxons.sevenwonders.model.cards
import kotlinx.serialization.Serializable
-import org.luxons.sevenwonders.model.api.PlayerDTO
import org.luxons.sevenwonders.model.boards.Requirements
import org.luxons.sevenwonders.model.resources.ResourceTransactions
import org.luxons.sevenwonders.model.resources.noTransactions
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
bgstack15