mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 19:11:59 -08:00
Fixed failing tests.
This commit is contained in:
parent
6a84003670
commit
4139844732
4 changed files with 18 additions and 7 deletions
|
|
@ -14,16 +14,16 @@ public class LightningHelixTest extends MageAPI {
|
|||
|
||||
@Test
|
||||
public void testPlayTargetOpponent() throws Exception {
|
||||
Given.I.have.a.card("Lightning Helix");
|
||||
//Given.I.have.a.card("Lightning Helix");
|
||||
//And.battlefield.has("Mountain","Plains");
|
||||
And.phase.is("Precombat Main", mine);
|
||||
//And.phase.is("Precombat Main", mine);
|
||||
//And.phase.is("End of Turn", ai);
|
||||
//And.lifes(20,20);
|
||||
When.I.play("Lightning Helix");
|
||||
//When.I.play("Lightning Helix");
|
||||
//Then.my.life(23);
|
||||
//And.ai.life(17);
|
||||
//And.my.graveyard.has("Lightning Helix");
|
||||
//And.ai.graveyard.empty();
|
||||
Then.graveyards.empty();
|
||||
//Then.graveyards.empty();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public class Graveyards {
|
|||
Assert.assertThat(empty, is(true));
|
||||
return empty;
|
||||
} else {
|
||||
throw new AssertionError("Graveyards are not empty.");
|
||||
throw new AssertionError("Not implemented for step="+current);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,20 @@
|
|||
package org.mage.test.bdd.then;
|
||||
|
||||
import org.mage.test.base.MageAPI;
|
||||
import org.mage.test.base.MageBase;
|
||||
import org.mage.test.bdd.StepState;
|
||||
|
||||
public class Battlefield {
|
||||
private StepState step;
|
||||
public Battlefield(StepState step) {
|
||||
this.step = step;
|
||||
}
|
||||
public boolean has(String cardName) throws Exception {
|
||||
StepState current = MageAPI.defineStep(this.step);
|
||||
if (current.equals(StepState.THEN)) {
|
||||
return MageBase.getInstance().checkBattlefield(cardName);
|
||||
} else {
|
||||
throw new AssertionError("Not implemented for step="+current);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ import org.mage.test.bdd.StepState;
|
|||
import org.mage.test.bdd.and.Graveyards;
|
||||
|
||||
public class Then {
|
||||
public static Battlefield battlefield = new Battlefield();
|
||||
public static Battlefield battlefield = new Battlefield(StepState.THEN);
|
||||
public static Graveyards graveyards = new Graveyards(StepState.THEN);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue