Merge pull request #2969 from Alexsandr0x/Machinate

Implement Machinate + unitTests
This commit is contained in:
LevelX2 2017-03-16 17:00:18 +01:00 committed by GitHub
commit 63e9ca9266
3 changed files with 119 additions and 0 deletions

View file

@ -0,0 +1,47 @@
package org.mage.test.cards.abilities.other;
import mage.constants.PhaseStep;
import mage.constants.Zone;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
/**
* Created by alexsandro on 14/03/17.
*/
public class MachinateTest extends CardTestPlayerBase {
@Test
public void checkDrawCount() {
addCard(Zone.BATTLEFIELD, playerA, "Seat of the Synod", 4);
addCard(Zone.BATTLEFIELD, playerB, "Seat of the Synod", 2);
// Any number just to have cards to draw
addCard(Zone.LIBRARY, playerA, "Island", 10);
addCard(Zone.HAND, playerA, "Machinate", 1);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Machinate");
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertHandCount(playerA, 1);
}
@Test
public void checkNoDraw() {
addCard(Zone.BATTLEFIELD, playerA, "Island", 4);
addCard(Zone.BATTLEFIELD, playerB, "Seat of the Synod", 2);
// Any number just to have cards to draw
addCard(Zone.LIBRARY, playerA, "Island", 10);
addCard(Zone.HAND, playerA, "Machinate", 1);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, "Machinate");
setStopAt(1, PhaseStep.BEGIN_COMBAT);
execute();
assertHandCount(playerA, 0);
}
}