This commit is contained in:
Oleg Agafonov 2019-03-06 14:06:47 +04:00
parent e0371bb22b
commit e68b79336a
9 changed files with 20 additions and 20 deletions

View file

@ -780,7 +780,7 @@ public class DeckEditorPanel extends javax.swing.JPanel {
private void processAndShowImportErrors(StringBuilder errorMessages) { private void processAndShowImportErrors(StringBuilder errorMessages) {
// show up errors list // show up errors list
if (errorMessages.length() > 0) { if (errorMessages.length() > 0) {
String mes = "Founded problems with deck: \n\n" + errorMessages.toString(); String mes = "Found problems with deck: \n\n" + errorMessages.toString();
JOptionPane.showMessageDialog(MageFrame.getDesktop(), mes.substring(0, Math.min(1000, mes.length())), "Errors while loading deck", JOptionPane.WARNING_MESSAGE); JOptionPane.showMessageDialog(MageFrame.getDesktop(), mes.substring(0, Math.min(1000, mes.length())), "Errors while loading deck", JOptionPane.WARNING_MESSAGE);
} }
} }

View file

@ -410,7 +410,7 @@ public class SessionImpl implements Session {
if (forceDBComparison || serverState.getExpansionsContentVersion() > expansionDBVersion) { if (forceDBComparison || serverState.getExpansionsContentVersion() > expansionDBVersion) {
List<String> setCodes = ExpansionRepository.instance.getSetCodes(); List<String> setCodes = ExpansionRepository.instance.getSetCodes();
List<ExpansionInfo> expansions = server.getMissingExpansionData(setCodes); List<ExpansionInfo> expansions = server.getMissingExpansionData(setCodes);
logger.info("DB: updating sets... Founded new: " + expansions.size()); logger.info("DB: updating sets... Found new: " + expansions.size());
ExpansionRepository.instance.saveSets(expansions, null, serverState.getExpansionsContentVersion()); ExpansionRepository.instance.saveSets(expansions, null, serverState.getExpansionsContentVersion());
} }
@ -419,7 +419,7 @@ public class SessionImpl implements Session {
if (forceDBComparison || serverState.getCardsContentVersion() > cardDBVersion) { if (forceDBComparison || serverState.getCardsContentVersion() > cardDBVersion) {
List<String> classNames = CardRepository.instance.getClassNames(); List<String> classNames = CardRepository.instance.getClassNames();
List<CardInfo> cards = server.getMissingCardsData(classNames); List<CardInfo> cards = server.getMissingCardsData(classNames);
logger.info("DB: updating cards... Founded new: " + cards.size()); logger.info("DB: updating cards... Found new: " + cards.size());
CardRepository.instance.saveCards(cards, serverState.getCardsContentVersion()); CardRepository.instance.saveCards(cards, serverState.getCardsContentVersion());
} }
} }

View file

@ -416,7 +416,7 @@ public class LoadTest {
} }
if (errors.size() > 0) { if (errors.size() > 0) {
System.out.println("Not all games finished, founded " + errors.size() + " errors: "); System.out.println("Not all games finished, found " + errors.size() + " errors: ");
for (String s : errors) { for (String s : errors) {
System.out.println(s); System.out.println(s);
} }

View file

@ -442,7 +442,7 @@ public class TestPlayer implements Player {
continue; continue;
} }
// founded, can use as target // found, can use as target
if (currentTarget.getNumberOfTargets() == 1) { if (currentTarget.getNumberOfTargets() == 1) {
currentTarget.clearChosen(); currentTarget.clearChosen();

View file

@ -228,7 +228,7 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement
} }
} }
Assert.assertFalse("Wrong stop command on " + this.stopOnTurn + " / " + this.stopAtStep + " (" + this.stopAtStep.getIndex() + ")" Assert.assertFalse("Wrong stop command on " + this.stopOnTurn + " / " + this.stopAtStep + " (" + this.stopAtStep.getIndex() + ")"
+ " (founded actions after stop on " + maxTurn + " / " + maxPhase + ")", + " (found actions after stop on " + maxTurn + " / " + maxPhase + ")",
(maxTurn > this.stopOnTurn) || (maxTurn == this.stopOnTurn && maxPhase > this.stopAtStep.getIndex())); (maxTurn > this.stopOnTurn) || (maxTurn == this.stopOnTurn && maxPhase > this.stopAtStep.getIndex()));
for (Player player : currentGame.getPlayers().values()) { for (Player player : currentGame.getPlayers().values()) {
@ -1220,17 +1220,17 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement
} }
public void assertActionsCount(TestPlayer player, int count) throws AssertionError { public void assertActionsCount(TestPlayer player, int count) throws AssertionError {
Assert.assertEquals("(Actions of " + player.getName() + ") Count are not equel (founded [" Assert.assertEquals("(Actions of " + player.getName() + ") Count are not equel (found ["
+ player.getActions().stream().map(PlayerAction::getAction).collect(Collectors.joining(", ")) + player.getActions().stream().map(PlayerAction::getAction).collect(Collectors.joining(", "))
+ "])", count, player.getActions().size()); + "])", count, player.getActions().size());
} }
public void assertChoicesCount(TestPlayer player, int count) throws AssertionError { public void assertChoicesCount(TestPlayer player, int count) throws AssertionError {
Assert.assertEquals("(Choices of " + player.getName() + ") Count are not equel (founded " + player.getChoices() + ")", count, player.getChoices().size()); Assert.assertEquals("(Choices of " + player.getName() + ") Count are not equel (found " + player.getChoices() + ")", count, player.getChoices().size());
} }
public void assertTargetsCount(TestPlayer player, int count) throws AssertionError { public void assertTargetsCount(TestPlayer player, int count) throws AssertionError {
Assert.assertEquals("(Targets of " + player.getName() + ") Count are not equel (founded " + player.getTargets() + ")", count, player.getTargets().size()); Assert.assertEquals("(Targets of " + player.getName() + ") Count are not equel (found " + player.getTargets() + ")", count, player.getTargets().size());
} }
public void assertAllCommandsUsed() throws AssertionError { public void assertAllCommandsUsed() throws AssertionError {

View file

@ -39,7 +39,7 @@ public class ManaOptionsTestUtils {
for(Mana mana: manaList){ for(Mana mana: manaList){
String s = mana.toString(); String s = mana.toString();
if(list.contains(s)){ if(list.contains(s)){
Assert.fail("Founded duplicated mana option " + s + " in " + manaList.toString()); Assert.fail("Found duplicated mana option " + s + " in " + manaList.toString());
}else{ }else{
list.add(s); list.add(s);
} }

View file

@ -145,11 +145,11 @@ public class VerifyCardDataTest {
String errorType; String errorType;
if (checkCard.getName().equals(prevCard.getName())) { if (checkCard.getName().equals(prevCard.getName())) {
errorType = " founded DUPLICATED cards" errorType = " found DUPLICATED cards"
+ " set (" + set.getCode() + " - " + set.getName() + ")" + " set (" + set.getCode() + " - " + set.getName() + ")"
+ " (" + checkCard.getCardNumber() + " - " + checkCard.getName() + ")"; + " (" + checkCard.getCardNumber() + " - " + checkCard.getName() + ")";
} else { } else {
errorType = " founded TYPOS in card numbers" errorType = " found TYPOS in card numbers"
+ " set (" + set.getCode() + " - " + set.getName() + ")" + " set (" + set.getCode() + " - " + set.getName() + ")"
+ " (" + prevCard.getCardNumber() + " - " + prevCard.getName() + ")" + " (" + prevCard.getCardNumber() + " - " + prevCard.getName() + ")"
+ " and" + " and"
@ -170,7 +170,7 @@ public class VerifyCardDataTest {
} }
if (doubleErrors.size() > 0) { if (doubleErrors.size() > 0) {
Assert.fail("DB have duplicated card numbers, founded errors: " + doubleErrors.size()); Assert.fail("DB have duplicated card numbers, found errors: " + doubleErrors.size());
} }
} }
@ -191,7 +191,7 @@ public class VerifyCardDataTest {
if (!needClass.equals(currentClass)) { if (!needClass.equals(currentClass)) {
// workaround to star wars set with same card names // workaround to star wars set with same card names
if (!checkCard.getName().equals("Syndicate Enforcer")) { if (!checkCard.getName().equals("Syndicate Enforcer")) {
errorsList.add("Error: founded wrong class in set " + set.getCode() + " - " + checkCard.getName() + " (" + currentClass + " <> " + needClass + ")"); errorsList.add("Error: found wrong class in set " + set.getCode() + " - " + checkCard.getName() + " (" + currentClass + " <> " + needClass + ")");
} }
} }
} else { } else {
@ -208,7 +208,7 @@ public class VerifyCardDataTest {
System.out.println("Total unique cards: " + classesIndex.size() + ", total non unique cards (reprints): " + totalCards); System.out.println("Total unique cards: " + classesIndex.size() + ", total non unique cards (reprints): " + totalCards);
if (errorsList.size() > 0) { if (errorsList.size() > 0) {
Assert.fail("DB have wrong card classes, founded errors: " + errorsList.size()); Assert.fail("DB have wrong card classes, found errors: " + errorsList.size());
} }
} }
@ -351,7 +351,7 @@ public class VerifyCardDataTest {
printMessages(warningsList); printMessages(warningsList);
printMessages(errorsList); printMessages(errorsList);
if (errorsList.size() > 0) { if (errorsList.size() > 0) {
Assert.fail("Founded set errors: " + errorsList.size()); Assert.fail("Found set errors: " + errorsList.size());
} }
} }
@ -386,7 +386,7 @@ public class VerifyCardDataTest {
printMessages(warningsList); printMessages(warningsList);
printMessages(errorsList); printMessages(errorsList);
if (errorsList.size() > 0) { if (errorsList.size() > 0) {
Assert.fail("Founded card errors: " + errorsList.size()); Assert.fail("Found card errors: " + errorsList.size());
} }
} }
@ -485,7 +485,7 @@ public class VerifyCardDataTest {
printMessages(warningsList); printMessages(warningsList);
printMessages(errorsList); printMessages(errorsList);
if (errorsList.size() > 0) { if (errorsList.size() > 0) {
Assert.fail("Founded token errors: " + errorsList.size()); Assert.fail("Found token errors: " + errorsList.size());
} }
} }

View file

@ -482,7 +482,7 @@ public class ObjectColor implements Serializable, Copyable<ObjectColor>, Compara
public ColoredManaSymbol getOneColoredManaSymbol() { public ColoredManaSymbol getOneColoredManaSymbol() {
if (isMulticolored()) { if (isMulticolored()) {
throw new IllegalStateException("Founded multicolored object, but it's must call with single mana color."); throw new IllegalStateException("Found multicolored object, but it's must call with single mana color.");
} }
if (isBlack()) { if (isBlack()) {

View file

@ -56,7 +56,7 @@ public class DckDeckImporter extends PlainTextDeckImporter {
CardInfo foundedCard = CardRepository.instance.findCard(setCode, cardNum); CardInfo foundedCard = CardRepository.instance.findCard(setCode, cardNum);
boolean wasOutdated = false; boolean wasOutdated = false;
if ((foundedCard != null) && !foundedCard.getName().equals(cardName)){ if ((foundedCard != null) && !foundedCard.getName().equals(cardName)){
sbMessage.append("Line ").append(lineCount).append(": ").append("founded outdated card number or name, will try to replace: ").append(line).append('\n'); sbMessage.append("Line ").append(lineCount).append(": ").append("found outdated card number or name, will try to replace: ").append(line).append('\n');
wasOutdated = true; wasOutdated = true;
foundedCard = null; foundedCard = null;
} }