From 2408136f3210c49f572d76695341a4c3027f1ce8 Mon Sep 17 00:00:00 2001 From: magenoxx Date: Wed, 6 Jun 2012 10:50:49 +0400 Subject: [PATCH] Apostle's Blessing --- .../protection/gain/GainProtectionTest.java | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 Mage.Tests/src/test/java/org/mage/test/cards/protection/gain/GainProtectionTest.java diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/protection/gain/GainProtectionTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/protection/gain/GainProtectionTest.java new file mode 100644 index 00000000000..950fb676acb --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/protection/gain/GainProtectionTest.java @@ -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); + } + +}