forked from External/mage
Updated readme with actual card stats, added stats printing on mage-verify tests
This commit is contained in:
parent
09e7cb358b
commit
60443cdbfe
2 changed files with 8 additions and 7 deletions
|
|
@ -152,10 +152,13 @@ public class VerifyCardDataTest {
|
|||
public void checkWrongCardClasses(){
|
||||
Collection<String> errorsList = new ArrayList<>();
|
||||
Map<String, String> classesIndex = new HashMap<>();
|
||||
int totalCards = 0;
|
||||
|
||||
Collection<ExpansionSet> sets = Sets.getInstance().values();
|
||||
for (ExpansionSet set : sets) {
|
||||
for (ExpansionSet.SetCardInfo checkCard : set.getSetCardInfo()) {
|
||||
totalCards = totalCards + 1;
|
||||
|
||||
String currentClass = checkCard.getCardClass().toString();
|
||||
if (classesIndex.containsKey(checkCard.getName())) {
|
||||
String needClass = classesIndex.get(checkCard.getName());
|
||||
|
|
@ -175,6 +178,9 @@ public class VerifyCardDataTest {
|
|||
System.out.println(error);
|
||||
}
|
||||
|
||||
// unique cards stats
|
||||
System.out.println("Total unique cards: " + classesIndex.size() + ", total non unique cards (reprints): " + totalCards);
|
||||
|
||||
if (errorsList.size() > 0){
|
||||
Assert.fail("DB have wrong card classes, founded errors: " + errorsList.size());
|
||||
}
|
||||
|
|
@ -205,15 +211,10 @@ public class VerifyCardDataTest {
|
|||
errorsList.add("Warning: total missing sets: " + totalMissingSets + ", with missing cards: " + totalMissingCards);
|
||||
}
|
||||
|
||||
|
||||
// only warnings
|
||||
for (String error: errorsList) {
|
||||
System.out.println(error);
|
||||
}
|
||||
|
||||
if (errorsList.size() > 0){
|
||||
|
||||
//Assert.fail("DB have wrong card classes, founded errors: " + errorsList.size());
|
||||
}
|
||||
}
|
||||
|
||||
private static final Pattern SHORT_JAVA_STRING = Pattern.compile("(?<=\")[A-Z][a-z]+(?=\")");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue