Adding tests for Cirdan errata (converted from older tests)
This commit is contained in:
@@ -16,14 +16,18 @@ public class Card_10_008_ErrataTests
|
|||||||
|
|
||||||
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
|
protected GenericCardTestHelper GetScenario() throws CardNotFoundException, DecisionResultInvalidException {
|
||||||
return new GenericCardTestHelper(
|
return new GenericCardTestHelper(
|
||||||
new HashMap<>()
|
new HashMap<>() {{
|
||||||
{{
|
put("cirdan", "60_8");
|
||||||
put("card", "60_8");
|
put("event1", "1_37");
|
||||||
// put other cards in here as needed for the test case
|
put("event2", "1_37");
|
||||||
}},
|
put("event3", "1_37");
|
||||||
GenericCardTestHelper.FellowshipSites,
|
put("event4", "1_37");
|
||||||
GenericCardTestHelper.FOTRFrodo,
|
put("event5", "1_37");
|
||||||
GenericCardTestHelper.RulingRing
|
put("event6", "1_37");
|
||||||
|
put("event7", "1_37");
|
||||||
|
|
||||||
|
put("nazgul", "1_233");
|
||||||
|
}}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,7 +52,7 @@ public class Card_10_008_ErrataTests
|
|||||||
|
|
||||||
var scn = GetScenario();
|
var scn = GetScenario();
|
||||||
|
|
||||||
var card = scn.GetFreepsCard("card");
|
var card = scn.GetFreepsCard("cirdan");
|
||||||
|
|
||||||
assertEquals("Cirdan", card.getBlueprint().getTitle());
|
assertEquals("Cirdan", card.getBlueprint().getTitle());
|
||||||
assertEquals("The Shipwright", card.getBlueprint().getSubtitle());
|
assertEquals("The Shipwright", card.getBlueprint().getSubtitle());
|
||||||
@@ -63,18 +67,41 @@ public class Card_10_008_ErrataTests
|
|||||||
assertEquals(6, card.getBlueprint().getResistance());
|
assertEquals(6, card.getBlueprint().getResistance());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Uncomment any @Test markers below once this is ready to be used
|
@Test
|
||||||
//@Test
|
public void CirdanReducesMinionStrengthAndRemovesEventsIfOverwhelming() throws DecisionResultInvalidException, CardNotFoundException {
|
||||||
public void CirdanTest1() throws DecisionResultInvalidException, CardNotFoundException {
|
|
||||||
//Pre-game setup
|
//Pre-game setup
|
||||||
var scn = GetScenario();
|
GenericCardTestHelper scn = GetScenario();
|
||||||
|
|
||||||
var card = scn.GetFreepsCard("card");
|
PhysicalCardImpl cirdan = scn.GetFreepsCard("cirdan");
|
||||||
scn.FreepsMoveCardToHand(card);
|
PhysicalCardImpl nazgul = scn.GetShadowCard("nazgul");
|
||||||
|
|
||||||
|
scn.ShadowMoveCharToTable(cirdan);
|
||||||
|
scn.FreepsMoveCardToDiscard("event1", "event2", "event3", "event4", "event5", "event6", "event7");
|
||||||
|
|
||||||
|
scn.ShadowMoveCharToTable(nazgul);
|
||||||
|
|
||||||
scn.StartGame();
|
scn.StartGame();
|
||||||
scn.FreepsPlayCard(card);
|
|
||||||
|
|
||||||
assertEquals(4, scn.GetTwilight());
|
scn.SkipToPhase(Phase.ASSIGNMENT);
|
||||||
|
scn.PassCurrentPhaseActions();
|
||||||
|
scn.FreepsAssignToMinions(cirdan, nazgul);
|
||||||
|
|
||||||
|
//this nazgul should be strength 10, -5 = 5, enough to trigger Cirdan's secondary effect after the skirmish ends
|
||||||
|
scn.FreepsResolveSkirmish(cirdan);
|
||||||
|
assertTrue(scn.FreepsActionAvailable("Use Cirdan"));
|
||||||
|
scn.FreepsUseCardAction(cirdan);
|
||||||
|
|
||||||
|
assertEquals(1, scn.GetWoundsOn(cirdan));
|
||||||
|
assertEquals(3, scn.GetStrength(nazgul));
|
||||||
|
scn.ShadowPassCurrentPhaseAction();
|
||||||
|
scn.FreepsPassCurrentPhaseAction();
|
||||||
|
|
||||||
|
scn.FreepsResolveRuleFirst(); //Skirmish result first
|
||||||
|
assertEquals(Zone.DISCARD, nazgul.getZone());
|
||||||
|
assertTrue(scn.FreepsDecisionAvailable("Choose card from discard"));
|
||||||
|
assertEquals(3, scn.FreepsGetChoiceMin());
|
||||||
|
scn.FreepsChoose(scn.FreepsGetCardChoices().get(0), scn.FreepsGetCardChoices().get(1), scn.FreepsGetCardChoices().get(2));
|
||||||
|
|
||||||
|
assertEquals(4, scn.GetFreepsDiscardCount());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user