summaryrefslogtreecommitdiff
path: root/backend/src/test/java
diff options
context:
space:
mode:
authorJoffrey BION <joffrey.bion@gmail.com>2017-01-23 00:34:12 +0100
committerJoffrey BION <joffrey.bion@gmail.com>2017-01-23 00:34:12 +0100
commitc316cd7d87d819dc3f800c56b97bf4e0234888f6 (patch)
tree93e9d0131c55457108e4a12eaafa72b316da2625 /backend/src/test/java
parentMinor visual styles (diff)
downloadseven-wonders-c316cd7d87d819dc3f800c56b97bf4e0234888f6.tar.gz
seven-wonders-c316cd7d87d819dc3f800c56b97bf4e0234888f6.tar.bz2
seven-wonders-c316cd7d87d819dc3f800c56b97bf4e0234888f6.zip
Add test checking the switch to PLAYING state
Diffstat (limited to 'backend/src/test/java')
-rw-r--r--backend/src/test/java/org/luxons/sevenwonders/game/LobbyTest.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/backend/src/test/java/org/luxons/sevenwonders/game/LobbyTest.java b/backend/src/test/java/org/luxons/sevenwonders/game/LobbyTest.java
index 4a12592e..b959ed96 100644
--- a/backend/src/test/java/org/luxons/sevenwonders/game/LobbyTest.java
+++ b/backend/src/test/java/org/luxons/sevenwonders/game/LobbyTest.java
@@ -167,4 +167,13 @@ public class LobbyTest {
addPlayers(nbPlayers - 1);
lobby.startGame();
}
+
+ @Test
+ public void startGame_switchesState() {
+ assertTrue(lobby.getState() == State.LOBBY);
+ // there is already the owner
+ addPlayers(gameDefinition.getMinPlayers() - 1);
+ lobby.startGame();
+ assertTrue(lobby.getState() == State.PLAYING);
+ }
} \ No newline at end of file
bgstack15