Fixed verify tests to ignore mtgjson updates

This commit is contained in:
Oleg Agafonov 2019-01-14 06:19:39 +04:00
parent f566f3af71
commit b0e2845b59
5 changed files with 22 additions and 0 deletions

View file

@ -1,7 +1,12 @@
package mage.verify;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.util.List;
import static mage.verify.MtgJson.MTGJSON_IGNORE_NEW_PROPERTIES;
@JsonIgnoreProperties(ignoreUnknown = MTGJSON_IGNORE_NEW_PROPERTIES)
class JsonCard {
// docs: https://mtgjson.com/v4/docs.html

View file

@ -1,5 +1,10 @@
package mage.verify;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import static mage.verify.MtgJson.MTGJSON_IGNORE_NEW_PROPERTIES;
@JsonIgnoreProperties(ignoreUnknown = MTGJSON_IGNORE_NEW_PROPERTIES)
public class JsonForeignData {
public String flavorText;
public String language;

View file

@ -1,7 +1,12 @@
package mage.verify;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.util.List;
import static mage.verify.MtgJson.MTGJSON_IGNORE_NEW_PROPERTIES;
@JsonIgnoreProperties(ignoreUnknown = MTGJSON_IGNORE_NEW_PROPERTIES)
class JsonSet {
public int baseSetSize;
public String block;

View file

@ -1,7 +1,12 @@
package mage.verify;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.util.List;
import static mage.verify.MtgJson.MTGJSON_IGNORE_NEW_PROPERTIES;
@JsonIgnoreProperties(ignoreUnknown = MTGJSON_IGNORE_NEW_PROPERTIES)
public class JsonToken {
public String artist;
public String borderColor;

View file

@ -24,6 +24,8 @@ public final class MtgJson {
public static Map<String, String> mtgJsonToXMageCodes = new HashMap<>();
public static Map<String, String> xMageToMtgJsonCodes = new HashMap<>();
public static final boolean MTGJSON_IGNORE_NEW_PROPERTIES = true; // set it to false for full mtgjson checks and research (new fields finds or mtgjson updates)
static {
mtgJsonToXMageCodes.put("pWCQ", "WMCQ");
mtgJsonToXMageCodes.put("pSUS", "SUS");