diff options
author | Joffrey Bion <joffrey.bion@amadeus.com> | 2018-07-06 13:59:33 +0200 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@amadeus.com> | 2018-07-06 14:16:57 +0200 |
commit | 5615172249c3e1a95f6e03333fd7e456bd5db5ca (patch) | |
tree | ba1c20dc199c89da4ac2791f0369bde7c07fbfc1 /game-engine/src/test | |
parent | Update yarn.lock (diff) | |
download | seven-wonders-5615172249c3e1a95f6e03333fd7e456bd5db5ca.tar.gz seven-wonders-5615172249c3e1a95f6e03333fd7e456bd5db5ca.tar.bz2 seven-wonders-5615172249c3e1a95f6e03333fd7e456bd5db5ca.zip |
Prevent PICK_NEIGHBOUR_GUILD action if no guild to pick
Diffstat (limited to 'game-engine/src/test')
-rw-r--r-- | game-engine/src/test/java/org/luxons/sevenwonders/game/GameTest.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/game-engine/src/test/java/org/luxons/sevenwonders/game/GameTest.java b/game-engine/src/test/java/org/luxons/sevenwonders/game/GameTest.java index ff34dc27..02531cde 100644 --- a/game-engine/src/test/java/org/luxons/sevenwonders/game/GameTest.java +++ b/game-engine/src/test/java/org/luxons/sevenwonders/game/GameTest.java @@ -24,6 +24,7 @@ import org.luxons.sevenwonders.game.resources.Resources; import org.luxons.sevenwonders.game.test.TestUtils; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; @@ -119,7 +120,8 @@ public class GameTest { private static PlayerMove createPickGuildMove(PlayerTurnInfo turnInfo) { List<Card> neighbourGuilds = turnInfo.getNeighbourGuildCards(); assertNotNull(neighbourGuilds); - String cardName = neighbourGuilds.isEmpty() ? null : neighbourGuilds.get(0).getName(); + assertFalse(neighbourGuilds.isEmpty()); + String cardName = neighbourGuilds.get(0).getName(); return TestUtils.createPlayerMove(cardName, MoveType.COPY_GUILD); } } |