tests: added mtgjson rules output in test_showCardInfo

This commit is contained in:
Oleg Agafonov 2023-09-17 15:51:17 +04:00
parent 66d132776e
commit bcea598fbd
2 changed files with 22 additions and 12 deletions

View file

@ -63,6 +63,10 @@ public final class MtgJsonService {
return SetHolder.sets;
}
public static Map<String, MtgJsonCard> cards() {
return CardHolder.cards;
}
public static MtgJsonMetadata meta() {
return SetHolder.meta;
}
@ -94,19 +98,10 @@ public final class MtgJsonService {
private static <T> T findReference(Map<String, T> reference, String name) {
T ref = reference.get(name);
if (ref == null) {
//name = name.replaceFirst("\\bA[Ee]", "Æ");
//ref = reference.get(name);
}
if (ref == null) {
//name = name.replace("'", "\""); // for Kongming, "Sleeping Dragon" & Pang Tong, "Young Phoenix"
//ref = reference.get(name);
}
if (ref == null) {
name = convertXmageToMtgJsonCardName(name);
ref = reference.get(name);
}
return ref;
}