From 7d7f0e6dec96efce5897a791e3a8d1f811a9de27 Mon Sep 17 00:00:00 2001 From: magenoxx Date: Wed, 18 Jul 2012 10:31:06 +0400 Subject: [PATCH] Two tests for Public Execution to check interaction with LoseAbility and Clone effects --- .../org/mage/test/cards/copy/CloneTest.java | 21 +++++++++++++++++++ .../test/cards/single/TurnToFrogTest.java | 20 ++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/copy/CloneTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/copy/CloneTest.java index bc6749ab0b..2c6f7234d0 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/copy/CloneTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/copy/CloneTest.java @@ -68,4 +68,25 @@ public class CloneTest extends CardTestPlayerBase { assertLife(playerA, 18); assertLife(playerB, 20); } + + @Test + public void testCard3() { + addCard(Constants.Zone.BATTLEFIELD, playerA, "Island", 6); + addCard(Constants.Zone.BATTLEFIELD, playerA, "Swamp", 6); + addCard(Constants.Zone.HAND, playerA, "Public Execution"); + addCard(Constants.Zone.HAND, playerA, "Clone"); + + addCard(Constants.Zone.BATTLEFIELD, playerB, "Llanowar Elves"); + addCard(Constants.Zone.BATTLEFIELD, playerB, "Craw Wurm"); + + castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Public Executio", "Llanowar Elves"); + castSpell(1, Constants.PhaseStep.POSTCOMBAT_MAIN, playerA, "Clone"); + + setStopAt(1, Constants.PhaseStep.END_TURN); + execute(); + + assertPermanentCount(playerB, "Llanowar Elves", 0); + assertPowerToughness(playerB, "Craw Wurm", 4, 4); + assertPowerToughness(playerA, "Craw Wurm", 6, 4); + } } diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/single/TurnToFrogTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/single/TurnToFrogTest.java index 99648008c1..b7b7d7b1c2 100644 --- a/Mage.Tests/src/test/java/org/mage/test/cards/single/TurnToFrogTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/cards/single/TurnToFrogTest.java @@ -58,4 +58,24 @@ public class TurnToFrogTest extends CardTestPlayerBase { assertCounterCount("Raging Ravine", CounterType.P1P1, 1); } + @Test + public void testCard3() { + addCard(Constants.Zone.BATTLEFIELD, playerA, "Island", 6); + addCard(Constants.Zone.BATTLEFIELD, playerA, "Swamp", 6); + addCard(Constants.Zone.HAND, playerA, "Public Execution"); + addCard(Constants.Zone.HAND, playerA, "Turn to Frog"); + + addCard(Constants.Zone.BATTLEFIELD, playerB, "Llanowar Elves"); + addCard(Constants.Zone.BATTLEFIELD, playerB, "Craw Wurm"); + + castSpell(1, Constants.PhaseStep.PRECOMBAT_MAIN, playerA, "Public Executio", "Llanowar Elves"); + castSpell(1, Constants.PhaseStep.POSTCOMBAT_MAIN, playerA, "Turn to Frog", "Craw Wurm"); + + setStopAt(1, Constants.PhaseStep.END_TURN); + execute(); + + assertPermanentCount(playerB, "Llanowar Elves", 0); + assertPowerToughness(playerB, "Craw Wurm", -1, 1); + } + }