From 9000b4480c39d0f2304e19655894db7e8d87c590 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Thu, 12 Dec 2013 19:46:40 +0100 Subject: [PATCH] Added a test that checks if by Smelt-Ward Gatekeepers targted controlled creature gets haste as intended. --- .../control/GainControlTargetEffectTest.java | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlTargetEffectTest.java diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlTargetEffectTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlTargetEffectTest.java new file mode 100644 index 00000000000..177f754bda0 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/control/GainControlTargetEffectTest.java @@ -0,0 +1,40 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package org.mage.test.cards.control; + +import mage.abilities.keyword.HasteAbility; +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author LevelX2 + */ +public class GainControlTargetEffectTest extends CardTestPlayerBase { + + /** + * Checks if control has changed and the controlled creature has Hase + * + */ + @Test + public void testPermanentControlEffect() { + addCard(Zone.HAND, playerA, "Smelt-Ward Gatekeepers", 1); + addCard(Zone.BATTLEFIELD, playerA, "Mountain", 4); + addCard(Zone.BATTLEFIELD, playerA, "Boros Guildgate", 2); + + addCard(Zone.BATTLEFIELD, playerB, "Silvercoat Lion"); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Smelt-Ward Gatekeepers"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + // under opponent's control + assertPermanentCount(playerA, "Silvercoat Lion", 1); + assertAbility(playerA, "Silvercoat Lion", HasteAbility.getInstance(), true); + } +}