summaryrefslogtreecommitdiff
path: root/sw-server/src/test/kotlin/org/luxons
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@booking.com>2020-05-28 20:26:29 +0200
committerJoffrey Bion <joffrey.bion@booking.com>2020-05-31 11:16:00 +0200
commit36103b92ce4b6cd00925d861f4fb5e381cdc4833 (patch)
tree4c2bfced8317526b24da23fcef9febe6368c736e /sw-server/src/test/kotlin/org/luxons
parentAttempt at fixing race conditions with bot subscriptions (diff)
downloadseven-wonders-36103b92ce4b6cd00925d861f4fb5e381cdc4833.tar.gz
seven-wonders-36103b92ce4b6cd00925d861f4fb5e381cdc4833.tar.bz2
seven-wonders-36103b92ce4b6cd00925d861f4fb5e381cdc4833.zip
Simplify settings and allow choosing wonders
Diffstat (limited to 'sw-server/src/test/kotlin/org/luxons')
-rw-r--r--sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/LobbyControllerTest.kt9
-rw-r--r--sw-server/src/test/kotlin/org/luxons/sevenwonders/server/lobby/LobbyTest.kt4
2 files changed, 6 insertions, 7 deletions
diff --git a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/LobbyControllerTest.kt b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/LobbyControllerTest.kt
index 9aa1ef0e..2f6e2cdb 100644
--- a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/LobbyControllerTest.kt
+++ b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/LobbyControllerTest.kt
@@ -2,8 +2,7 @@ package org.luxons.sevenwonders.server.controllers
import org.junit.Before
import org.junit.Test
-import org.luxons.sevenwonders.model.CustomizableSettings
-import org.luxons.sevenwonders.model.WonderSidePickMethod.ALL_A
+import org.luxons.sevenwonders.model.Settings
import org.luxons.sevenwonders.model.api.State
import org.luxons.sevenwonders.model.api.actions.ReorderPlayersAction
import org.luxons.sevenwonders.model.api.actions.UpdateSettingsAction
@@ -142,9 +141,9 @@ class LobbyControllerTest {
addPlayer(lobby, "testuser3")
addPlayer(lobby, "testuser4")
- assertEquals(CustomizableSettings(), lobby.settings)
+ assertEquals(Settings(), lobby.settings)
- val newSettings = CustomizableSettings(12L, 5, ALL_A, 5, 5, 4, 10, 2, HashMap())
+ val newSettings = Settings(12L, 5, 5, 5, 4, 10, 2, HashMap())
val updateSettingsAction = UpdateSettingsAction(newSettings)
val principal = TestPrincipal("testuser")
@@ -161,7 +160,7 @@ class LobbyControllerTest {
addPlayer(lobby, "testuser2")
addPlayer(lobby, "testuser3")
- val updateSettingsAction = UpdateSettingsAction(CustomizableSettings())
+ val updateSettingsAction = UpdateSettingsAction(Settings())
val principal = TestPrincipal("testuser2")
diff --git a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/lobby/LobbyTest.kt b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/lobby/LobbyTest.kt
index 094fe7de..1742dc93 100644
--- a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/lobby/LobbyTest.kt
+++ b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/lobby/LobbyTest.kt
@@ -9,7 +9,7 @@ import org.junit.experimental.theories.Theories
import org.junit.experimental.theories.Theory
import org.junit.runner.RunWith
import org.luxons.sevenwonders.engine.data.GameDefinition
-import org.luxons.sevenwonders.model.CustomizableSettings
+import org.luxons.sevenwonders.model.Settings
import org.luxons.sevenwonders.model.api.State
import org.luxons.sevenwonders.server.lobby.Lobby.GameAlreadyStartedException
import org.luxons.sevenwonders.server.lobby.Lobby.PlayerListMismatchException
@@ -240,7 +240,7 @@ class LobbyTest {
@Test
fun setSettings() {
- val settings = CustomizableSettings()
+ val settings = Settings()
lobby.settings = settings
assertSame(settings, lobby.settings)
}
bgstack15