Add test for Battlebond
Test Battlebond's partner mechanic
@@ -4,10 +4,13 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
+import mage.abilities.Ability;
import mage.cards.Card;
import mage.cards.repository.CardInfo;
import mage.cards.repository.CardScanner;
import mage.sets.FateReforged;
+import mage.sets.Battlebond;
+import mage.abilities.keyword.PartnerWithAbility;
import mage.sets.MastersEditionII;
import mage.sets.MastersEditionIV;
import static org.junit.Assert.assertFalse;
@@ -31,8 +34,30 @@ public class BoosterGenerationTest extends MageTestBase {
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
public void testFateReforged() {
+
List<String> tapland = Arrays.asList(
"Bloodfell Caves", "Blossoming Sands", "Dismal Backwater", "Jungle Hollow", "Rugged Highlands",
"Scoured Barrens", "Swiftwater Cliffs", "Thornwood Falls", "Tranquil Cove", "Wind-Scarred Crag");
@@ -44,7 +69,6 @@ public class BoosterGenerationTest extends MageTestBase {
|| contains(booster, basics, null));
// assertFalse(str(booster), contains(booster, basics, null));
}
-
@Test
public void testMastersEditionII() {
List<String> snowCoveredLand = Arrays.asList(
