From 1917871b98e0886e76c3d77d0147a5a96b93e067 Mon Sep 17 00:00:00 2001 From: Hanmac Date: Thu, 24 Jan 2019 07:28:14 +0100 Subject: [PATCH] GameSimulatorTest: assert check for DoubleRiot --- .../java/forge/ai/simulation/GameSimulatorTest.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/forge-gui-desktop/src/test/java/forge/ai/simulation/GameSimulatorTest.java b/forge-gui-desktop/src/test/java/forge/ai/simulation/GameSimulatorTest.java index 2ec7fffc06a..fdd5c7f4d35 100644 --- a/forge-gui-desktop/src/test/java/forge/ai/simulation/GameSimulatorTest.java +++ b/forge-gui-desktop/src/test/java/forge/ai/simulation/GameSimulatorTest.java @@ -1508,9 +1508,11 @@ public class GameSimulatorTest extends SimulationTestCase { Player p = game.getPlayers().get(0); game.getPhaseHandler().devModeSet(PhaseType.MAIN1, p); + final String goblinName = "Zhur-Taa Goblin"; + addCard("Rhythm of the Wild", p); - Card goblin = addCardToZone("Zhur-Taa Goblin", p, ZoneType.Hand); + Card goblin = addCardToZone(goblinName, p, ZoneType.Hand); addCard("Mountain", p); addCard("Forest", p); @@ -1521,5 +1523,13 @@ public class GameSimulatorTest extends SimulationTestCase { GameSimulator sim = createSimulator(game, p); int score = sim.simulateSpellAbility(goblinSA).value; assertTrue(score > 0); + + Game simGame = sim.getSimulatedGameState(); + + Card simGoblin = findCardWithName(simGame, goblinName); + + assertNotNull(simGoblin); + int effects = simGoblin.getCounters(CounterType.P1P1) + simGoblin.getKeywordMagnitude(Keyword.HASTE); + assertTrue(effects == 2); } }