mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 20:32:06 -08:00
Tests: added many verify tests for sets and cards, e.g.:
* check set's class name/file (source code style); * check set's hasBasicLands settings (missing lands in deck generation bug); * check card's UsesVariousArt settings (same image for multi-images card bug); * check card's missing abilities (forgot addAbility call bug); * improved output messages;
This commit is contained in:
parent
64721675f2
commit
6bb478c342
2 changed files with 181 additions and 34 deletions
|
|
@ -152,6 +152,30 @@ public class BoosterGenerationTest extends MageTestBase {
|
|||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testColdSnap_BoosterMustHaveOneSnowLand() {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
List<Card> booster = Coldsnap.getInstance().createBooster();
|
||||
assertTrue("coldsnap's booster must contain 1 snow covered land", booster.stream().anyMatch(card -> card.isBasic() && card.getName().startsWith("Snow-Covered ")));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMastersEditionII_BoosterMustHaveOneSnowLand() {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
List<Card> booster = MastersEditionII.getInstance().createBooster();
|
||||
assertTrue("Master Editions II's booster must contain 1 snow covered land", booster.stream().anyMatch(card -> card.isBasic() && card.getName().startsWith("Snow-Covered ")));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBattlebond_BoosterMustHaveOneLand() {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
List<Card> booster = Coldsnap.getInstance().createBooster();
|
||||
assertTrue("battlebond's booster must contain 1 land", booster.stream().anyMatch(card -> card.isBasic() && card.isLand()));
|
||||
}
|
||||
}
|
||||
|
||||
private static String str(List<Card> cards) {
|
||||
StringBuilder sb = new StringBuilder("[");
|
||||
Iterator<Card> iterator = cards.iterator();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue