From 566caedd61edd1a9af794c840108e1cebcfe9618 Mon Sep 17 00:00:00 2001 From: tamaroth Date: Tue, 7 Aug 2018 23:20:27 +0200 Subject: [PATCH] Add a test for a triggered ability of Tuvasa the Sunlit The test makes sure that a triggered ability of Tuvasa is triggered only once and draws only one card when more than one enchantment spells are cast by the controller of Tuvasa during a single turn. --- .../cards/triggers/TuvasaTheSunlitTest.java | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Mage.Tests/src/test/java/org/mage/test/cards/triggers/TuvasaTheSunlitTest.java diff --git a/Mage.Tests/src/test/java/org/mage/test/cards/triggers/TuvasaTheSunlitTest.java b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/TuvasaTheSunlitTest.java new file mode 100644 index 00000000000..63b529c335f --- /dev/null +++ b/Mage.Tests/src/test/java/org/mage/test/cards/triggers/TuvasaTheSunlitTest.java @@ -0,0 +1,40 @@ + +package org.mage.test.cards.triggers; + +import mage.constants.PhaseStep; +import mage.constants.Zone; +import org.junit.Test; +import org.mage.test.serverside.base.CardTestPlayerBase; + +/** + * + * @author tamaroth + */ +public class TuvasaTheSunlitTest extends CardTestPlayerBase { + + /** + * Playing more than one enchantment spell in a single turn does not draw more than 1 additional card. + */ + @Test + public void testWithStriveSpell() { + addCard(Zone.BATTLEFIELD, playerA, "Plains", 1); + addCard(Zone.BATTLEFIELD, playerA, "Island", 1); + addCard(Zone.BATTLEFIELD, playerA, "Forest", 1); + + // Whenever you play your first enchantment spell of the turn, draw a card. + addCard(Zone.BATTLEFIELD, playerA, "Tuvasa the Sunlit", 1); + + // Two enchantments to play + addCard(Zone.HAND, playerA, "Burgeoning", 1); + addCard(Zone.HAND, playerA, "Ajani's Welcome", 1); + + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Burgeoning"); + castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Ajani's Welcome"); + + setStopAt(1, PhaseStep.BEGIN_COMBAT); + execute(); + + assertHandCount(playerA, 1); + } + +}