mirror of
https://github.com/correl/mage.git
synced 2025-04-13 17:00:09 -09:00
Updated Mage Verify test
This commit is contained in:
parent
1143169054
commit
c3d0297045
1 changed files with 7 additions and 32 deletions
|
@ -54,16 +54,6 @@ public class VerifyCardDataTest {
|
||||||
static {
|
static {
|
||||||
// skip lists for checks (example: unstable cards with same name may have different stats)
|
// skip lists for checks (example: unstable cards with same name may have different stats)
|
||||||
|
|
||||||
// TODO: mtgjson have wrong data for UGL
|
|
||||||
// remove after fixed
|
|
||||||
// https://github.com/mtgjson/mtgjson/issues/531
|
|
||||||
// https://github.com/mtgjson/mtgjson/issues/534
|
|
||||||
// https://github.com/mtgjson/mtgjson/issues/535
|
|
||||||
|
|
||||||
// TODO: mtgjson have wrong data to last dino updates from wizards 11.01.2018
|
|
||||||
// remove after fixed
|
|
||||||
// https://github.com/mtgjson/mtgjson/issues/538
|
|
||||||
|
|
||||||
// power-toughness
|
// power-toughness
|
||||||
skipListCreate("PT");
|
skipListCreate("PT");
|
||||||
skipListAddName("PT", "Garbage Elemental"); // UST
|
skipListAddName("PT", "Garbage Elemental"); // UST
|
||||||
|
@ -77,25 +67,12 @@ public class VerifyCardDataTest {
|
||||||
|
|
||||||
// supertype
|
// supertype
|
||||||
skipListCreate("SUPERTYPE");
|
skipListCreate("SUPERTYPE");
|
||||||
skipListAddName("SUPERTYPE", "Timmy, Power Gamer"); // UGL, mtgjson error
|
|
||||||
|
|
||||||
// type
|
// type
|
||||||
skipListCreate("TYPE");
|
skipListCreate("TYPE");
|
||||||
skipListAddName("TYPE", "Fowl Play"); // UGL, mtgjson error
|
|
||||||
|
|
||||||
// subtype
|
// subtype
|
||||||
skipListCreate("SUBTYPE");
|
skipListCreate("SUBTYPE");
|
||||||
skipListAddName("SUBTYPE", "Timmy, Power Gamer"); // UGL, mtgjson error
|
|
||||||
skipListAddName("SUBTYPE", "Fowl Play"); // UGL, mtgjson error
|
|
||||||
skipListAddName("SUBTYPE", "Paper Tiger"); // UGL, mtgjson error
|
|
||||||
skipListAddName("SUBTYPE", "Rock Lobster"); // UGL, mtgjson error
|
|
||||||
skipListAddName("SUBTYPE", "Scissors Lizard"); // UGL, mtgjson error
|
|
||||||
skipListAddName("SUBTYPE", "Urza's Science Fair Project"); // UGL, mtgjson error
|
|
||||||
skipListAddName("SUBTYPE", "Ripscale Predator"); // mtgjson error for dino update
|
|
||||||
skipListAddName("SUBTYPE", "Regal Behemoth"); // mtgjson error for dino update
|
|
||||||
skipListAddName("SUBTYPE", "Gnathosaur"); // mtgjson error for dino update
|
|
||||||
skipListAddName("SUBTYPE", "Pteron Ghost"); // mtgjson error for dino update
|
|
||||||
|
|
||||||
|
|
||||||
// number
|
// number
|
||||||
skipListCreate("NUMBER");
|
skipListCreate("NUMBER");
|
||||||
|
@ -388,7 +365,6 @@ public class VerifyCardDataTest {
|
||||||
// https://api.scryfall.com/cards/search?order=set&q=%21%E2%80%9CAngel%E2%80%9D&unique=prints
|
// https://api.scryfall.com/cards/search?order=set&q=%21%E2%80%9CAngel%E2%80%9D&unique=prints
|
||||||
// 3. Collect all strings in "set@name"
|
// 3. Collect all strings in "set@name"
|
||||||
// 4. Proccess tokens data and find missing strings from "set@name" list
|
// 4. Proccess tokens data and find missing strings from "set@name" list
|
||||||
|
|
||||||
printMessages(warningsList);
|
printMessages(warningsList);
|
||||||
printMessages(errorsList);
|
printMessages(errorsList);
|
||||||
if (errorsList.size() > 0) {
|
if (errorsList.size() > 0) {
|
||||||
|
@ -492,7 +468,7 @@ public class VerifyCardDataTest {
|
||||||
// fix names (e.g. Urza’s to Urza's)
|
// fix names (e.g. Urza’s to Urza's)
|
||||||
if (expected != null && expected.contains("Urza’s")) {
|
if (expected != null && expected.contains("Urza’s")) {
|
||||||
expected = new ArrayList<>(expected);
|
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("Urza’s")) {
|
if (it.next().equals("Urza’s")) {
|
||||||
it.set("Urza's");
|
it.set("Urza's");
|
||||||
}
|
}
|
||||||
|
@ -595,19 +571,18 @@ public class VerifyCardDataTest {
|
||||||
checkName = name.replace("Snow-Covered ", "");
|
checkName = name.replace("Snow-Covered ", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
return checkName.equals("Island") ||
|
return checkName.equals("Island")
|
||||||
checkName.equals("Forest") ||
|
|| checkName.equals("Forest")
|
||||||
checkName.equals("Swamp") ||
|
|| checkName.equals("Swamp")
|
||||||
checkName.equals("Plains") ||
|
|| checkName.equals("Plains")
|
||||||
checkName.equals("Mountain") ||
|
|| checkName.equals("Mountain")
|
||||||
checkName.equals("Wastes");
|
|| checkName.equals("Wastes");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkBasicLands(Card card, JsonCard ref) {
|
private void checkBasicLands(Card card, JsonCard ref) {
|
||||||
|
|
||||||
// basic lands must have Rarity.LAND and SuperType.BASIC
|
// basic lands must have Rarity.LAND and SuperType.BASIC
|
||||||
// other cards can't have that stats
|
// other cards can't have that stats
|
||||||
|
|
||||||
if (isBasicLandName(card.getName())) {
|
if (isBasicLandName(card.getName())) {
|
||||||
// lands
|
// lands
|
||||||
if (card.getRarity() != Rarity.LAND) {
|
if (card.getRarity() != Rarity.LAND) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue