mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
Fix booster generation issues with Mystery Booster set.
- Split the foil sheet into a separate set as listed on Scryfall. - Added unit test cases that verify booster generation.
This commit is contained in:
parent
656908aeec
commit
e39a9706bc
3 changed files with 1996 additions and 1983 deletions
|
|
@ -16,8 +16,7 @@ import org.mage.test.serverside.base.MageTestBase;
|
|||
|
||||
import java.util.*;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* @author nigelzor, JayDi85
|
||||
|
|
@ -72,6 +71,62 @@ public class BoosterGenerationTest extends MageTestBase {
|
|||
// assertFalse(str(booster), contains(booster, basics, null));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMysteryBooster1() {
|
||||
// https://magic.wizards.com/en/articles/archive/feature/unraveling-mystery-booster-2019-11-14
|
||||
List<Card> booster = MysteryBooster.getInstance().createBooster();
|
||||
Assert.assertNotNull(booster);
|
||||
Assert.assertEquals("Pack contains 15 cards", 15, booster.size());
|
||||
|
||||
Assert.assertTrue("Slot 1 is white", booster.get(0).getColor(null).isWhite());
|
||||
Assert.assertTrue("Slot 2 is white", booster.get(1).getColor(null).isWhite());
|
||||
|
||||
Assert.assertTrue("Slot 3 is blue", booster.get(2).getColor(null).isBlue());
|
||||
Assert.assertTrue("Slot 4 is blue", booster.get(3).getColor(null).isBlue());
|
||||
|
||||
Assert.assertTrue("Slot 5 is black", booster.get(4).getColor(null).isBlack());
|
||||
Assert.assertTrue("Slot 6 is black", booster.get(5).getColor(null).isBlack());
|
||||
|
||||
Assert.assertTrue("Slot 7 is red", booster.get(6).getColor(null).isRed());
|
||||
Assert.assertTrue("Slot 8 is red", booster.get(7).getColor(null).isRed());
|
||||
|
||||
Assert.assertTrue("Slot 9 is green", booster.get(8).getColor(null).isGreen());
|
||||
Assert.assertTrue("Slot 10 is green", booster.get(9).getColor(null).isGreen());
|
||||
|
||||
Assert.assertTrue("Slot 11 is multicolored", booster.get(10).getColor(null).isMulticolored());
|
||||
Assert.assertTrue("Slot 12 is colorless", booster.get(11).getColor(null).isColorless());
|
||||
|
||||
Assert.assertEquals("Slot 15 is from FMB1 set","FMB1", booster.get(14).getExpansionSetCode());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMysteryBooster1Create15CardBooster() {
|
||||
// https://magic.wizards.com/en/articles/archive/feature/unraveling-mystery-booster-2019-11-14
|
||||
List<Card> booster = MysteryBooster.getInstance().create15CardBooster();
|
||||
Assert.assertNotNull(booster);
|
||||
Assert.assertEquals("Pack contains 15 cards", 15, booster.size());
|
||||
|
||||
Assert.assertTrue("Slot 1 is white", booster.get(0).getColor(null).isWhite());
|
||||
Assert.assertTrue("Slot 2 is white", booster.get(1).getColor(null).isWhite());
|
||||
|
||||
Assert.assertTrue("Slot 3 is blue", booster.get(2).getColor(null).isBlue());
|
||||
Assert.assertTrue("Slot 4 is blue", booster.get(3).getColor(null).isBlue());
|
||||
|
||||
Assert.assertTrue("Slot 5 is black", booster.get(4).getColor(null).isBlack());
|
||||
Assert.assertTrue("Slot 6 is black", booster.get(5).getColor(null).isBlack());
|
||||
|
||||
Assert.assertTrue("Slot 7 is red", booster.get(6).getColor(null).isRed());
|
||||
Assert.assertTrue("Slot 8 is red", booster.get(7).getColor(null).isRed());
|
||||
|
||||
Assert.assertTrue("Slot 9 is green", booster.get(8).getColor(null).isGreen());
|
||||
Assert.assertTrue("Slot 10 is green", booster.get(9).getColor(null).isGreen());
|
||||
|
||||
Assert.assertTrue("Slot 11 is multicolored", booster.get(10).getColor(null).isMulticolored());
|
||||
Assert.assertTrue("Slot 12 is colorless", booster.get(11).getColor(null).isColorless());
|
||||
|
||||
Assert.assertEquals("Slot 15 is from FMB1 set","FMB1", booster.get(14).getExpansionSetCode());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMastersEditionII() {
|
||||
List<String> snowCoveredLand = new ArrayList<>(Arrays.asList(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue