From 5615172249c3e1a95f6e03333fd7e456bd5db5ca Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Fri, 6 Jul 2018 13:59:33 +0200 Subject: Prevent PICK_NEIGHBOUR_GUILD action if no guild to pick --- game-engine/src/test/java/org/luxons/sevenwonders/game/GameTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'game-engine/src/test') 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 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); } } -- cgit