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