From c01e1cd133455a426600647e9831c1778a787468 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Wed, 24 Feb 2021 20:55:22 -0500 Subject: [PATCH] [LEA] added test for Forcefield --- .../replacement/prevent/ForcefieldTest.java | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Mage.Tests/src/test/java/org/mage/test/cards/replacement/prevent/ForcefieldTest.java diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/replacement/prevent/ForcefieldTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/prevent/ForcefieldTest.java new file mode 100644 index 0000000000..2839c48d49 --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/replacement/prevent/ForcefieldTest.java @@ -0,0 +1,38 @@ +package org.mage.test.cards.replacement.prevent; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * @author TheElk801 + */ +public class ForcefieldTest extends CardTestPlayerBase { + + private static final String giant = "Bonebreaker Giant"; + private static final String lion = "Silvercoat Lion"; + + @Test + public void testForcefield() { + addCard(Zone.BATTLEFIELD, playerB, "Wastes", 2); + addCard(Zone.BATTLEFIELD, playerB, "Forcefield"); + addCard(Zone.BATTLEFIELD, playerA, giant); + addCard(Zone.BATTLEFIELD, playerA, lion); + + attack(1, playerA, giant); + attack(1, playerA, lion); + + setChoice(playerB, giant); + setChoice(playerB, lion); + activateAbility(1, PhaseStep.DECLARE_BLOCKERS, playerB, "{1}"); + activateAbility(1, PhaseStep.DECLARE_BLOCKERS, playerB, "{1}"); + + setStrictChooseMode(true); + setStopAt(1, PhaseStep.END_TURN); + execute(); + assertAllCommandsUsed(); + + assertLife(playerB, 20 - 1 - 1); + } +}