mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
More tests. One test fails.
This commit is contained in:
parent
7b1ffb6ced
commit
1eba9096b0
3 changed files with 88 additions and 5 deletions
|
|
@ -0,0 +1,33 @@
|
|||
package org.mage.test.cards.abilities.enters;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import mage.Constants;
|
||||
import mage.game.permanent.Permanent;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author noxx
|
||||
*/
|
||||
public class AEtherFigmentTest extends CardTestPlayerBase {
|
||||
|
||||
@Test
|
||||
public void testEnteringWithCounters() {
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Island", 5);
|
||||
addCard(Constants.Zone.HAND, playerA, "AEther Figment");
|
||||
|
||||
castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "AEther Figment");
|
||||
|
||||
setStopAt(1, Constants.PhaseStep.BEGIN_COMBAT);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20);
|
||||
assertPermanentCount(playerA, "AEther Figment", 1);
|
||||
|
||||
Permanent aetherFigment = getPermanent("AEther Figment", playerA.getId());
|
||||
Assert.assertEquals(3, aetherFigment.getPower().getValue());
|
||||
Assert.assertEquals(3, aetherFigment.getToughness().getValue());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
package org.mage.test.combat;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import mage.Constants;
|
||||
import mage.game.permanent.Permanent;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
/**
|
||||
* Test restrictions for choosing attackers and blockers.
|
||||
*
|
||||
* @author noxx
|
||||
*/
|
||||
public class AttackBlockRestrictionsTest extends CardTestPlayerBase {
|
||||
|
||||
@Test
|
||||
public void testFlyingVsNonFlying() {
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Captain of the Mists");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerB, "Mist Raven");
|
||||
|
||||
attack(2, playerB, "Mist Raven");
|
||||
block(2, playerA, "Captain of the Mists", "Mist Raven");
|
||||
|
||||
setStopAt(2, Constants.PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 18);
|
||||
assertLife(playerB, 20);
|
||||
|
||||
Permanent mistRaven = getPermanent("Mist Raven", playerB.getId());
|
||||
Assert.assertTrue("Should be tapped because of attacking", mistRaven.isTapped());
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests attacking creature doesn't untap after being blocked by Wall of Frost
|
||||
*/
|
||||
@Test
|
||||
public void testWallofWrost() {
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerA, "Wall of Frost");
|
||||
addCard(Constants.Zone.BATTLEFIELD, playerB, "Craw Wurm");
|
||||
|
||||
attack(2, playerB, "Craw Wurm");
|
||||
block(2, playerA, "Wall of Frost", "Craw Wurm");
|
||||
|
||||
setStopAt(4, Constants.PhaseStep.END_TURN);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 20);
|
||||
assertLife(playerB, 20);
|
||||
|
||||
Permanent crawWurm = getPermanent("Craw Wurm", playerB.getId());
|
||||
Assert.assertTrue("Should be tapped because of being blocked by Wall of Frost", crawWurm.isTapped());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue