Test for Evolve.

This commit is contained in:
LevelX2 2013-03-19 12:27:48 +01:00
parent 44a226dede
commit 4270809b76

View file

@ -0,0 +1,90 @@
package org.mage.test.cards.abilities.keywords;
import mage.Constants;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
*
* @author LevelX2
*/
public class EvolveTest extends CardTestPlayerBase {
@Test
public void testCreatureComesIntoPlay() {
// Cloudfin Raptor gets one +1/+1 because Mindeye Drake comes into play
addCard(Constants.Zone.BATTLEFIELD, playerA, "Island", 5);
addCard(Constants.Zone.BATTLEFIELD, playerA, "Cloudfin Raptor", 1);
addCard(Constants.Zone.HAND, playerA, "Mindeye Drake");
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Mindeye Drake");
setStopAt(1, Constants.PhaseStep.BEGIN_COMBAT);
execute();
assertLife(playerA, 20);
assertLife(playerB, 20);
assertPermanentCount(playerA, "Cloudfin Raptor", 1);
assertPermanentCount(playerA, "Mindeye Drake", 1);
assertPowerToughness(playerA, "Cloudfin Raptor", 1, 2);
assertPowerToughness(playerA, "Mindeye Drake", 2, 5);
}
@Test
public void testCreatureComesIntoPlayNoCounter() {
// Experiment One gets no counter because Kird Ape is 1/1 with no Forest in play
addCard(Constants.Zone.BATTLEFIELD, playerA, "Mountain", 1);
addCard(Constants.Zone.BATTLEFIELD, playerA, "Experiment One", 1);
addCard(Constants.Zone.HAND, playerA, "Kird Ape");
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Kird Ape");
setStopAt(1, Constants.PhaseStep.BEGIN_COMBAT);
execute();
assertLife(playerA, 20);
assertLife(playerB, 20);
assertPermanentCount(playerA, "Experiment One", 1);
assertPermanentCount(playerA, "Kird Ape", 1);
assertPowerToughness(playerA, "Experiment One", 1, 1);
assertPowerToughness(playerA, "Kird Ape", 1, 1);
}
@Test
public void testCreatureComesStrongerIntoPlayCounter() {
// Experiment One gets a counter because Kird Ape is 2/2 with a Forest in play
addCard(Constants.Zone.BATTLEFIELD, playerA, "Mountain", 1);
addCard(Constants.Zone.BATTLEFIELD, playerA, "Forest", 1);
addCard(Constants.Zone.BATTLEFIELD, playerA, "Experiment One", 1);
addCard(Constants.Zone.HAND, playerA, "Kird Ape");
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Kird Ape");
setStopAt(1, Constants.PhaseStep.BEGIN_COMBAT);
execute();
assertLife(playerA, 20);
assertLife(playerB, 20);
assertPermanentCount(playerA, "Experiment One", 1);
assertPermanentCount(playerA, "Kird Ape", 1);
assertPowerToughness(playerA, "Experiment One", 2, 2);
assertPowerToughness(playerA, "Kird Ape", 2, 3);
}
}