From 0377c75d4c48deb84a5ed26a5e643734f0f38133 Mon Sep 17 00:00:00 2001 From: demilich Date: Tue, 7 Jun 2016 21:13:00 +0200 Subject: [PATCH] Added test case for Cone of Cold bug --- .../metastone/tests/CardInteractionTests.java | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/game/src/test/java/net/demilich/metastone/tests/CardInteractionTests.java b/game/src/test/java/net/demilich/metastone/tests/CardInteractionTests.java index 946ac4a9a..1f6e29f78 100644 --- a/game/src/test/java/net/demilich/metastone/tests/CardInteractionTests.java +++ b/game/src/test/java/net/demilich/metastone/tests/CardInteractionTests.java @@ -366,5 +366,25 @@ public void testHauntedCreeperHarvestGolem() { } } } - + + @Test + public void testImpGangBossConeOfCold() { + GameContext context = createContext(HeroClass.MAGE, HeroClass.WARRIOR); + Player player = context.getPlayer1(); + Player opponent = context.getPlayer2(); + + context.endTurn(); + Minion firstYeti = playMinionCard(context, opponent, (MinionCard) CardCatalogue.getCardById("minion_chillwind_yeti")); + Minion impGangBoss = playMinionCard(context, opponent, (MinionCard) CardCatalogue.getCardById("minion_imp_gang_boss")); + Minion secondYeti = playMinionCard(context, opponent, (MinionCard) CardCatalogue.getCardById("minion_chillwind_yeti")); + Assert.assertEquals(opponent.getMinions().size(), 3); + context.endTurn(); + + playCardWithTarget(context, player, CardCatalogue.getCardById("spell_cone_of_cold"), impGangBoss); + Assert.assertEquals(opponent.getMinions().size(), 4); + Assert.assertTrue(firstYeti.hasAttribute(Attribute.FROZEN)); + Assert.assertTrue(impGangBoss.hasAttribute(Attribute.FROZEN)); + Assert.assertFalse(secondYeti.hasAttribute(Attribute.FROZEN)); + } } +