simplified a test

This commit is contained in:
Evan Kranzler 2021-05-07 09:15:12 -04:00
parent 8104cdb7a5
commit 690d640a05

View file

@ -820,21 +820,13 @@ public class VerifyCardDataTest {
// CHECK: wrong set class names
for (ExpansionSet set : sets) {
String className = extractShortClass(set.getClass());
String needClassName = set.getName()
//.replaceAll("Duel Decks", "")
String needClassName = Arrays.stream(
set.getName()
.replaceAll("&", "And")
.replaceAll(" vs. ", " Vs ") // for more friendly class name generation in logs TODO: replace to CamelCase transform instead custom words
.replaceAll(" the ", " The ")
.replaceAll(" in ", " In ")
.replaceAll(" and ", " And ")
.replaceAll(" of ", " Of ")
.replaceAll(" to ", " To ")
.replaceAll(" for ", " For ")
.replaceAll(" into ", " Into ")
.replaceAll(" over ", " Over ")
.replaceAll("[ .+-/:\"']", "");
.replaceAll("[.+-/:\"']", "")
.split(" ")
).map(CardUtil::getTextWithFirstCharUpperCase).reduce("", String::concat);
//if (!className.toLowerCase(Locale.ENGLISH).equals(needClassName.toLowerCase(Locale.ENGLISH))) {
if (!className.equals(needClassName)) {
errorsList.add("Error: set's class name must be equal to set name: "
+ className + " from " + set.getClass().getName() + ", caption: " + set.getName() + ", need name: " + needClassName);