forked from External/mage
Fixed verify tests to ignore mtgjson updates
This commit is contained in:
parent
f566f3af71
commit
b0e2845b59
5 changed files with 22 additions and 0 deletions
|
|
@ -1,7 +1,12 @@
|
||||||
package mage.verify;
|
package mage.verify;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import static mage.verify.MtgJson.MTGJSON_IGNORE_NEW_PROPERTIES;
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = MTGJSON_IGNORE_NEW_PROPERTIES)
|
||||||
class JsonCard {
|
class JsonCard {
|
||||||
// docs: https://mtgjson.com/v4/docs.html
|
// docs: https://mtgjson.com/v4/docs.html
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,10 @@
|
||||||
package mage.verify;
|
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 class JsonForeignData {
|
||||||
public String flavorText;
|
public String flavorText;
|
||||||
public String language;
|
public String language;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,12 @@
|
||||||
package mage.verify;
|
package mage.verify;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import static mage.verify.MtgJson.MTGJSON_IGNORE_NEW_PROPERTIES;
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = MTGJSON_IGNORE_NEW_PROPERTIES)
|
||||||
class JsonSet {
|
class JsonSet {
|
||||||
public int baseSetSize;
|
public int baseSetSize;
|
||||||
public String block;
|
public String block;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,12 @@
|
||||||
package mage.verify;
|
package mage.verify;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import static mage.verify.MtgJson.MTGJSON_IGNORE_NEW_PROPERTIES;
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = MTGJSON_IGNORE_NEW_PROPERTIES)
|
||||||
public class JsonToken {
|
public class JsonToken {
|
||||||
public String artist;
|
public String artist;
|
||||||
public String borderColor;
|
public String borderColor;
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,8 @@ public final class MtgJson {
|
||||||
public static Map<String, String> mtgJsonToXMageCodes = new HashMap<>();
|
public static Map<String, String> mtgJsonToXMageCodes = new HashMap<>();
|
||||||
public static Map<String, String> xMageToMtgJsonCodes = 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 {
|
static {
|
||||||
mtgJsonToXMageCodes.put("pWCQ", "WMCQ");
|
mtgJsonToXMageCodes.put("pWCQ", "WMCQ");
|
||||||
mtgJsonToXMageCodes.put("pSUS", "SUS");
|
mtgJsonToXMageCodes.put("pSUS", "SUS");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue