Added global alternate costs to canPlay test. Added Omniscienece test

case.
This commit is contained in:
Nathaniel Brandes 2015-04-29 03:04:34 -07:00
parent 9ab812f1ac
commit 4b6993f398
3 changed files with 117 additions and 33 deletions

View file

@ -0,0 +1,45 @@
package org.mage.test.cards.cost.alternate;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
public class OmniscienceTest extends CardTestPlayerBase {
@Test
public void testSpellNoCost() {
addCard(Zone.BATTLEFIELD, playerA, "Omniscience", 1);
addCard(Zone.HAND, playerA, "Gray Ogre", 1);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Gray Ogre");
setStopAt(1, PhaseStep.END_TURN);
execute();
//Gray Ogre is cast because it is free
assertPermanentCount(playerA, "Gray Ogre", 1);
}
@Test
public void testSpellHasCostIfCastFromGraveyard() {
addCard(Zone.BATTLEFIELD, playerA, "Omniscience", 1);
addCard(Zone.BATTLEFIELD, playerA, "Haakon, Stromgald Scourge", 1);
addCard(Zone.GRAVEYARD, playerA, "Knight of the White Orchid", 1);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Knight of the White Orchid");
setStopAt(1, PhaseStep.END_TURN);
execute();
//Knight of the White Orchid was not cast due to lack of mana
assertPermanentCount(playerA, "Knight of the White Orchid", 0);
}
}