mirror of
https://github.com/correl/mage.git
synced 2024-11-25 03:00:11 +00:00
simplified a test
This commit is contained in:
parent
8104cdb7a5
commit
690d640a05
1 changed files with 6 additions and 14 deletions
|
@ -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", "")
|
||||
.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("[ .+-/:\"']", "");
|
||||
String needClassName = Arrays.stream(
|
||||
set.getName()
|
||||
.replaceAll("&", "And")
|
||||
.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);
|
||||
|
|
Loading…
Reference in a new issue