1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-10 01:01:05 -09:00

Fixed verify test

This commit is contained in:
Oleg Agafonov 2021-07-04 23:29:38 +04:00
parent 18db51eb4c
commit 9eea77f815

View file

@ -87,33 +87,26 @@ public class VerifyCardDataTest {
// power-toughness // power-toughness
skipListCreate(SKIP_LIST_PT); skipListCreate(SKIP_LIST_PT);
skipListAddName(SKIP_LIST_PT, "UST", "Garbage Elemental"); skipListAddName(SKIP_LIST_PT, "AFR", "Dire Wolf Prowler"); // TODO: delete after AFR release
skipListAddName(SKIP_LIST_PT, "UST", "Infinity Elemental");
// color // color
skipListCreate(SKIP_LIST_COLOR); skipListCreate(SKIP_LIST_COLOR);
// cost // cost
skipListCreate(SKIP_LIST_COST); skipListCreate(SKIP_LIST_COST);
skipListAddName(SKIP_LIST_COST, "KTK", "Erase");
skipListAddName(SKIP_LIST_COST, "M13", "Erase");
skipListAddName(SKIP_LIST_COST, "ULG", "Erase");
skipListAddName(SKIP_LIST_COST, "WC00", "Erase");
skipListAddName(SKIP_LIST_COST, "H17", "Grimlock, Dinobot Leader");
skipListAddName(SKIP_LIST_COST, "UST", "Everythingamajig");
// supertype // supertype
skipListCreate(SKIP_LIST_SUPERTYPE); skipListCreate(SKIP_LIST_SUPERTYPE);
// type // type
skipListCreate(SKIP_LIST_TYPE); skipListCreate(SKIP_LIST_TYPE);
skipListAddName(SKIP_LIST_TYPE, "UNH", "Old Fogey"); skipListAddName(SKIP_LIST_TYPE, "UNH", "Old Fogey"); // uses summon word as a joke card
skipListAddName(SKIP_LIST_TYPE, "UND", "Old Fogey"); skipListAddName(SKIP_LIST_TYPE, "UND", "Old Fogey");
skipListAddName(SKIP_LIST_TYPE, "UST", "capital offense"); skipListAddName(SKIP_LIST_TYPE, "UST", "capital offense"); // uses "instant" instead "Instant" as a joke card
// subtype // subtype
skipListCreate(SKIP_LIST_SUBTYPE); skipListCreate(SKIP_LIST_SUBTYPE);
skipListAddName(SKIP_LIST_SUBTYPE, "UGL", "Miss Demeanor"); skipListAddName(SKIP_LIST_SUBTYPE, "UGL", "Miss Demeanor"); // uses multiple types as a joke card: Lady, of, Proper, Etiquette
// number // number
skipListCreate(SKIP_LIST_NUMBER); skipListCreate(SKIP_LIST_NUMBER);
@ -516,7 +509,7 @@ public class VerifyCardDataTest {
rootPath = Paths.get("..", "Mage.Client", "release", "sample-decks"); rootPath = Paths.get("..", "Mage.Client", "release", "sample-decks");
} }
if (!Files.exists(rootPath)) { if (!Files.exists(rootPath)) {
Assert.fail("Sample decks: unknown root folder " + rootPath.toAbsolutePath().toString()); Assert.fail("Sample decks: unknown root folder " + rootPath.toAbsolutePath());
} }
// collect all files in all root's folders // collect all files in all root's folders
@ -533,7 +526,7 @@ public class VerifyCardDataTest {
e.printStackTrace(); e.printStackTrace();
errorsList.add("Error: sample deck - can't get folder content - " + e.getMessage()); errorsList.add("Error: sample deck - can't get folder content - " + e.getMessage());
} }
Assert.assertTrue("Sample decks: can't find any deck files in " + rootPath.toAbsolutePath().toString(), filesList.size() > 0); Assert.assertTrue("Sample decks: can't find any deck files in " + rootPath.toAbsolutePath(), filesList.size() > 0);
// try to open deck files // try to open deck files
int totalErrorFiles = 0; int totalErrorFiles = 0;
@ -548,7 +541,7 @@ public class VerifyCardDataTest {
if (!deckErrors.toString().isEmpty()) { if (!deckErrors.toString().isEmpty()) {
errorsList.add("Error: sample deck contains errors " + deckName); errorsList.add("Error: sample deck contains errors " + deckName);
System.out.println("Errors in sample deck " + deckName + ":\n" + deckErrors.toString()); System.out.println("Errors in sample deck " + deckName + ":\n" + deckErrors);
totalErrorFiles++; totalErrorFiles++;
continue; continue;
} }