From cab8a5a83e810d14c97fbb26f0cdfe1b86e88d43 Mon Sep 17 00:00:00 2001 From: jbion Date: Tue, 19 Feb 2019 18:09:27 +0100 Subject: Fix board gold access and cleanup tests --- backend/src/test/kotlin/org/luxons/sevenwonders/SevenWondersTest.kt | 4 ++-- backend/src/test/kotlin/org/luxons/sevenwonders/lobby/LobbyTest.kt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'backend/src/test') diff --git a/backend/src/test/kotlin/org/luxons/sevenwonders/SevenWondersTest.kt b/backend/src/test/kotlin/org/luxons/sevenwonders/SevenWondersTest.kt index e8ffbe42..b98d9b91 100644 --- a/backend/src/test/kotlin/org/luxons/sevenwonders/SevenWondersTest.kt +++ b/backend/src/test/kotlin/org/luxons/sevenwonders/SevenWondersTest.kt @@ -100,7 +100,7 @@ class SevenWondersTest { var receivedLobbies = games.next() assertNotNull(receivedLobbies) - assertEquals(0, receivedLobbies.size.toLong()) + assertEquals(0, receivedLobbies.size) val ownerSession = newPlayer("GameOwner") val gameName = "Test Game" @@ -108,7 +108,7 @@ class SevenWondersTest { receivedLobbies = games.next() assertNotNull(receivedLobbies) - assertEquals(1, receivedLobbies.size.toLong()) + assertEquals(1, receivedLobbies.size) val receivedLobby = receivedLobbies[0] assertEquals(createdLobby.id, receivedLobby.id) assertEquals(createdLobby.name, receivedLobby.name) diff --git a/backend/src/test/kotlin/org/luxons/sevenwonders/lobby/LobbyTest.kt b/backend/src/test/kotlin/org/luxons/sevenwonders/lobby/LobbyTest.kt index 1d8b0f4d..aae431f4 100644 --- a/backend/src/test/kotlin/org/luxons/sevenwonders/lobby/LobbyTest.kt +++ b/backend/src/test/kotlin/org/luxons/sevenwonders/lobby/LobbyTest.kt @@ -118,8 +118,8 @@ class LobbyTest { } private fun addPlayers(nbPlayers: Int) { - for (i in 0 until nbPlayers) { - val player = Player("testuser$i", "Test User $i") + repeat(nbPlayers) { + val player = Player("testuser$it", "Test User $it") lobby.addPlayer(player) } } -- cgit