From 36103b92ce4b6cd00925d861f4fb5e381cdc4833 Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Thu, 28 May 2020 20:26:29 +0200 Subject: Simplify settings and allow choosing wonders --- .../sevenwonders/server/controllers/LobbyControllerTest.kt | 9 ++++----- .../kotlin/org/luxons/sevenwonders/server/lobby/LobbyTest.kt | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'sw-server/src/test') 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) } -- cgit