mirror of
https://github.com/correl/mage.git
synced 2025-01-11 11:05:23 +00:00
Failing tests for FlashAbility and AsThoughEffectImpl
This commit is contained in:
parent
0b9dec5ad0
commit
965565c680
2 changed files with 80 additions and 1 deletions
|
@ -0,0 +1,76 @@
|
|||
package org.mage.test.cards.asthough;
|
||||
|
||||
import mage.Constants;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* Yeva, Nature's Herald:
|
||||
* You may cast green creature cards as though they had flash.
|
||||
*
|
||||
* @author noxx
|
||||
*/
|
||||
public class YevaNaturesHeraldTest extends CardTestPlayerBase {
|
||||
|
||||
@Test
|
||||
public void testOnBattlefield() {
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Yeva, Nature's Herald");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Forest");
|
||||
addCard(Constants.Zone.HAND, playerA, "Llanowar Elves");
|
||||
|
||||
castSpell(1, Constants.PhaseStep.BEGIN_COMBAT, playerA, "Llanowar Elves");
|
||||
|
||||
setStopAt(1, Constants.PhaseStep.END_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Llanowar Elves", 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNonGreen() {
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Yeva, Nature's Herald");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Plains");
|
||||
addCard(Constants.Zone.HAND, playerA, "Elite Vanguard");
|
||||
|
||||
castSpell(1, Constants.PhaseStep.BEGIN_COMBAT, playerA, "Elite Vanguard");
|
||||
|
||||
setStopAt(1, Constants.PhaseStep.END_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Elite Vanguard", 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOtherZones() {
|
||||
addCard(Constants.Zone.GRAVEYARD, playerA, "Yeva, Nature's Herald");
|
||||
addCard(Constants.Zone.LIBRARY, playerA, "Yeva, Nature's Herald");
|
||||
addCard(Constants.Zone.HAND, playerA, "Yeva, Nature's Herald");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Forest");
|
||||
addCard(Constants.Zone.HAND, playerA, "Llanowar Elves");
|
||||
|
||||
castSpell(1, Constants.PhaseStep.BEGIN_COMBAT, playerA, "Llanowar Elves");
|
||||
|
||||
setStopAt(1, Constants.PhaseStep.END_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Llanowar Elves", 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEffectGetRemovedOnExile() {
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Yeva, Nature's Herald");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Forest");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Plains");
|
||||
addCard(Constants.Zone.HAND, playerA, "Llanowar Elves");
|
||||
addCard(Constants.Zone.HAND, playerA, "Path to Exile");
|
||||
|
||||
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Path to Exile", "Yeva, Nature's Herald");
|
||||
castSpell(1, Constants.PhaseStep.BEGIN_COMBAT, playerA, "Llanowar Elves");
|
||||
|
||||
setStopAt(1, Constants.PhaseStep.END_COMBAT);
|
||||
execute();
|
||||
|
||||
assertPermanentCount(playerA, "Llanowar Elves", 0);
|
||||
}
|
||||
|
||||
}
|
|
@ -155,6 +155,9 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement
|
|||
List<Card> cards = getCardList(gameZone, player);
|
||||
for (int i = 0; i < count; i++) {
|
||||
Card card = Sets.findCard(cardName, true);
|
||||
if (card == null) {
|
||||
throw new AssertionError("Couldn't find a card: " + cardName);
|
||||
}
|
||||
cards.add(card);
|
||||
}
|
||||
}
|
||||
|
@ -185,7 +188,7 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement
|
|||
return libraryCardsB;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new AssertionError("Zone is not supported by test framework: " + gameZone);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue