mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 22:12:03 -08:00
Tests: improved verify tests:
- added checks for duplicated indefinite articles in the rules; - improved test_showCardInfo - now it can search cards by simple class name too; - fixed some card/token texts;
This commit is contained in:
parent
e848f85e81
commit
255a050025
6 changed files with 42 additions and 26 deletions
|
|
@ -359,11 +359,6 @@ public enum CardRepository {
|
|||
return findPreferredOrLatestCard(cards, preferredSetCode);
|
||||
}
|
||||
|
||||
public CardInfo findPreferredCoreExpansionCardByClassName(String canonicalClassName, String preferredSetCode) {
|
||||
List<CardInfo> cards = findCardsByClass(canonicalClassName);
|
||||
return findPreferredOrLatestCard(cards, preferredSetCode);
|
||||
}
|
||||
|
||||
private CardInfo findPreferredOrLatestCard(List<CardInfo> cards, String preferredSetCode) {
|
||||
if (!cards.isEmpty()) {
|
||||
Date lastReleaseDate = null;
|
||||
|
|
|
|||
|
|
@ -54,6 +54,11 @@ public abstract class TokenImpl extends MageObjectImpl implements Token {
|
|||
public TokenImpl(String name, String description) {
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
|
||||
// verify check: indefinite article
|
||||
if (description.startsWith("a ") || description.startsWith("an ")) {
|
||||
throw new IllegalArgumentException("Wrong code usage: don't use indefinite article here - " + description);
|
||||
}
|
||||
}
|
||||
|
||||
protected TokenImpl(final TokenImpl token) {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public final class ZombieKnightToken extends TokenImpl {
|
|||
}
|
||||
|
||||
public ZombieKnightToken(){
|
||||
super("Zombie Knight Token", "a 2/2 black Zombie Knight creature token with menace");
|
||||
super("Zombie Knight Token", "2/2 black Zombie Knight creature token with menace");
|
||||
availableImageSetCodes = tokenImageSets;
|
||||
color.setBlack(true);
|
||||
cardType.add(CardType.CREATURE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue