diff options
author | jbion <joffrey.bion@amadeus.com> | 2019-02-19 18:09:27 +0100 |
---|---|---|
committer | jbion <joffrey.bion@amadeus.com> | 2019-02-19 19:01:52 +0100 |
commit | cab8a5a83e810d14c97fbb26f0cdfe1b86e88d43 (patch) | |
tree | e2e6ce43eca9b20ef82589e174ac411c22a9f318 /backend/src/test/kotlin | |
parent | Update repository URLs in README (diff) | |
download | seven-wonders-cab8a5a83e810d14c97fbb26f0cdfe1b86e88d43.tar.gz seven-wonders-cab8a5a83e810d14c97fbb26f0cdfe1b86e88d43.tar.bz2 seven-wonders-cab8a5a83e810d14c97fbb26f0cdfe1b86e88d43.zip |
Fix board gold access and cleanup tests
Diffstat (limited to 'backend/src/test/kotlin')
-rw-r--r-- | backend/src/test/kotlin/org/luxons/sevenwonders/SevenWondersTest.kt | 4 | ||||
-rw-r--r-- | backend/src/test/kotlin/org/luxons/sevenwonders/lobby/LobbyTest.kt | 4 |
2 files changed, 4 insertions, 4 deletions
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) } } |