huge rework on subtypes (#3668)

* huge rework on subtypes

* update for coat of arms

* fix test
This commit is contained in:
ingmargoudt 2017-07-16 23:57:39 +02:00 committed by Jeff Wadsworth
parent 81fb4b5d92
commit 09f0c9ad97
185 changed files with 1068 additions and 906 deletions

View file

@ -152,20 +152,20 @@ public class VerifyCardDataTest {
Collection<String> expected = ref.subtypes;
if (expected != null && expected.contains("Urzas")) {
expected = new ArrayList<>(expected);
for (ListIterator<String> it = ((List<String>) expected).listIterator(); it.hasNext();) {
for (ListIterator<String> it = ((List<String>) expected).listIterator(); it.hasNext(); ) {
if (it.next().equals("Urzas")) {
it.set("Urza's");
}
}
}
if (!eqSet(card.getSubtype(null), expected)) {
if (!eqSet(card.getSubtype(null).stream().map(p -> p.toString()).collect(Collectors.toSet()), expected)) {
fail(card, "subtypes", card.getSubtype(null) + " != " + expected);
}
}
private void checkSupertypes(Card card, JsonCard ref) {
Collection<String> expected = ref.supertypes;
if (!eqSet(card.getSuperType().stream().map(s->s.toString()).collect(Collectors.toList()), expected)) {
if (!eqSet(card.getSuperType().stream().map(s -> s.toString()).collect(Collectors.toList()), expected)) {
fail(card, "supertypes", card.getSuperType() + " != " + expected);
}
}