diff --git a/Mage.Tests/src/test/java/org/mage/test/sets/BoosterGenerationTest.java b/Mage.Tests/src/test/java/org/mage/test/sets/BoosterGenerationTest.java index 97c8b2acf2b..7e9cd397b47 100644 --- a/Mage.Tests/src/test/java/org/mage/test/sets/BoosterGenerationTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/sets/BoosterGenerationTest.java @@ -511,6 +511,15 @@ public class BoosterGenerationTest extends MageTestPlayerBase { } } + // String output formatter for the below debug test + private static String getManaCostOrColorIdentity(Card card) { + String result = card.getManaCost().getText(); + if (result.isEmpty()) { + result = "[" + card.getColorIdentity().toString().replace("{", "").replace("}", "") + "]"; + } + return result; + } + @Ignore // debug only: collect info about cards in boosters, see https://github.com/magefree/mage/issues/8081 @Test public void test_CollectBoosterStats() { @@ -524,7 +533,12 @@ public class BoosterGenerationTest extends MageTestPlayerBase { List booster = setToAnalyse.createBooster(); totalCards += booster.size(); booster.forEach(card -> { - String code = String.format("%s %s %s", card.getExpansionSetCode(), card.getRarity().toString().charAt(0), card.getName()); + String code = String.format("%s %s %3s %-32s %18s", + card.getExpansionSetCode(), + card.getRarity().toString().charAt(0), + card.getCardNumber(), + card.getName(), + getManaCostOrColorIdentity(card)); resRatio.putIfAbsent(code, 0); resRatio.computeIfPresent(code, (u, count) -> count + 1); }); @@ -536,14 +550,14 @@ public class BoosterGenerationTest extends MageTestPlayerBase { .map(Map.Entry::getValue) .collect(Collectors.toList()); if (!rarityCounts.isEmpty()) { - System.out.println(rarity + String.format(": %s unique, min %s, max %s, total %s", + System.out.println(rarity + String.format(": %3s unique, min %5s, max %5s, total %7s", rarityCounts.size(), Collections.min(rarityCounts), Collections.max(rarityCounts), rarityCounts.stream().mapToInt(x -> x).sum())); } } List info = resRatio.entrySet().stream() .sorted((o1, o2) -> Integer.compare(o2.getValue(), o1.getValue())) - .map(e -> String.format("%s: %d", + .map(e -> String.format("%s: %5d", e.getKey(), e.getValue() ))