Tests: added checks that planeswalkers must be legendary;

This commit is contained in:
Oleg Agafonov 2019-03-19 06:27:55 +04:00
parent e5759127ac
commit 490d207efe

View file

@ -383,6 +383,19 @@ public class VerifyCardDataTest {
}
}
// 2. all planeswalkers must be legendary
for (ExpansionSet set : sets) {
for (ExpansionSet.SetCardInfo cardInfo : set.getSetCardInfo()) {
Card card = CardImpl.createCard(cardInfo.getCardClass(), new CardSetInfo(cardInfo.getName(), set.getCode(),
cardInfo.getCardNumber(), cardInfo.getRarity(), cardInfo.getGraphicInfo()));
Assert.assertNotNull(card);
if (card.getCardType().contains(CardType.PLANESWALKER) && !card.getSuperType().contains(SuperType.LEGENDARY)) {
errorsList.add("error, planeswalker must have legendary type: " + set.getCode() + " - " + set.getName() + " - " + card.getName() + " - " + card.getCardNumber());
}
}
}
printMessages(warningsList);
printMessages(errorsList);
if (errorsList.size() > 0) {