Apostle's Blessing

This commit is contained in:
magenoxx 2012-06-06 10:50:49 +04:00
parent 5cc8901e07
commit 2408136f32

View file

@ -0,0 +1,73 @@
package org.mage.test.cards.protection.gain;
import mage.Constants;
import mage.Constants.PhaseStep;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
* @author noxx
*/
public class GainProtectionTest extends CardTestPlayerBase {
@Test
public void testGainProtectionFromSpellColor() {
addCard(Constants.Zone.BATTLEFIELD, playerA, "Plains", 2);
addCard(Constants.Zone.BATTLEFIELD, playerA, "Forest", 2);
addCard(Constants.Zone.BATTLEFIELD, playerA, "Elite Vanguard");
addCard(Constants.Zone.HAND, playerA, "Apostle's Blessing");
addCard(Constants.Zone.HAND, playerA, "Titanic Growth");
setChoice(playerA, "Green");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Apostle's Blessing", "Elite Vanguard");
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Titanic Growth", "Elite Vanguard");
setStopAt(1, PhaseStep.END_TURN);
execute();
assertHandCount(playerA, 1);
assertPermanentCount(playerA, "Elite Vanguard", 1);
assertPowerToughness(playerA, "Elite Vanguard", 2, 1);
}
@Test
public void testGainProtectionFromAnotherColor() {
addCard(Constants.Zone.BATTLEFIELD, playerA, "Plains", 2);
addCard(Constants.Zone.BATTLEFIELD, playerA, "Forest", 2);
addCard(Constants.Zone.BATTLEFIELD, playerA, "Elite Vanguard");
addCard(Constants.Zone.HAND, playerA, "Apostle's Blessing");
addCard(Constants.Zone.HAND, playerA, "Titanic Growth");
setChoice(playerA, "Black");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Apostle's Blessing", "Elite Vanguard");
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Titanic Growth", "Elite Vanguard");
setStopAt(1, PhaseStep.END_TURN);
execute();
assertHandCount(playerA, 0);
assertPermanentCount(playerA, "Elite Vanguard", 1);
assertPowerToughness(playerA, "Elite Vanguard", 6, 5);
}
@Test
public void testGainProtectionFromArtifacts() {
addCard(Constants.Zone.BATTLEFIELD, playerA, "Plains", 2);
addCard(Constants.Zone.BATTLEFIELD, playerA, "Forest", 2);
addCard(Constants.Zone.BATTLEFIELD, playerA, "Elite Vanguard");
addCard(Constants.Zone.HAND, playerA, "Apostle's Blessing");
addCard(Constants.Zone.HAND, playerA, "Titanic Growth");
setChoice(playerA, "Artifacts");
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Apostle's Blessing", "Elite Vanguard");
castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, "Titanic Growth", "Elite Vanguard");
setStopAt(1, PhaseStep.END_TURN);
execute();
assertHandCount(playerA, 0);
assertPermanentCount(playerA, "Elite Vanguard", 1);
assertPowerToughness(playerA, "Elite Vanguard", 6, 5);
}
}