mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Add test for Battlebond
Test Battlebond's partner mechanic
This commit is contained in:
parent
d754410934
commit
a1a7b1c59b
1 changed files with 26 additions and 2 deletions
|
@ -4,10 +4,13 @@ import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import mage.abilities.Ability;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.repository.CardInfo;
|
import mage.cards.repository.CardInfo;
|
||||||
import mage.cards.repository.CardScanner;
|
import mage.cards.repository.CardScanner;
|
||||||
import mage.sets.FateReforged;
|
import mage.sets.FateReforged;
|
||||||
|
import mage.sets.Battlebond;
|
||||||
|
import mage.abilities.keyword.PartnerWithAbility;
|
||||||
import mage.sets.MastersEditionII;
|
import mage.sets.MastersEditionII;
|
||||||
import mage.sets.MastersEditionIV;
|
import mage.sets.MastersEditionIV;
|
||||||
import static org.junit.Assert.assertFalse;
|
import static org.junit.Assert.assertFalse;
|
||||||
|
@ -28,11 +31,33 @@ public class BoosterGenerationTest extends MageTestBase {
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
CardScanner.scan();
|
CardScanner.scan();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final List<String> basics = Arrays.asList("Plains", "Island", "Swamp", "Mountain", "Forest");
|
private static final List<String> basics = Arrays.asList("Plains", "Island", "Swamp", "Mountain", "Forest");
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testBattlebond(){
|
||||||
|
List<Card> booster = Battlebond.getInstance().createBooster();
|
||||||
|
boolean foundPartner = false;
|
||||||
|
String Partner = "";
|
||||||
|
|
||||||
|
for (Card card : booster){
|
||||||
|
for (Ability ability : card.getAbilities()){
|
||||||
|
if (ability instanceof PartnerWithAbility) {
|
||||||
|
if (foundPartner){
|
||||||
|
Assert.assertEquals(Partner, card.getName());
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
foundPartner = true;
|
||||||
|
Partner = ((PartnerWithAbility) ability).getPartnerName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testFateReforged() {
|
public void testFateReforged() {
|
||||||
|
|
||||||
List<String> tapland = Arrays.asList(
|
List<String> tapland = Arrays.asList(
|
||||||
"Bloodfell Caves", "Blossoming Sands", "Dismal Backwater", "Jungle Hollow", "Rugged Highlands",
|
"Bloodfell Caves", "Blossoming Sands", "Dismal Backwater", "Jungle Hollow", "Rugged Highlands",
|
||||||
"Scoured Barrens", "Swiftwater Cliffs", "Thornwood Falls", "Tranquil Cove", "Wind-Scarred Crag");
|
"Scoured Barrens", "Swiftwater Cliffs", "Thornwood Falls", "Tranquil Cove", "Wind-Scarred Crag");
|
||||||
|
@ -44,7 +69,6 @@ public class BoosterGenerationTest extends MageTestBase {
|
||||||
|| contains(booster, basics, null));
|
|| contains(booster, basics, null));
|
||||||
// assertFalse(str(booster), contains(booster, basics, null));
|
// assertFalse(str(booster), contains(booster, basics, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testMastersEditionII() {
|
public void testMastersEditionII() {
|
||||||
List<String> snowCoveredLand = Arrays.asList(
|
List<String> snowCoveredLand = Arrays.asList(
|
||||||
|
|
Loading…
Reference in a new issue