tests: improved testable dialogs (added source code ref in result table for better IDE navigation, part of #13643, #13638);

This commit is contained in:
Oleg Agafonov 2025-06-15 14:08:43 +04:00
parent 4f8eb30e4c
commit d893d52190
21 changed files with 127 additions and 49 deletions

View file

@ -148,6 +148,12 @@ public class ComputerPlayer extends PlayerImpl {
log.debug("choose: " + outcome.toString() + ':' + target.toString());
}
// choose itself for starting player all the time
if (target.getMessage(game).equals("Select a starting player")) {
target.add(this.getId(), game);
return true;
}
boolean isAddedSomething = false; // must return true on any changes in targets, so game can ask next choose dialog until finish
// controller hints:

View file

@ -297,7 +297,7 @@ public class HumanPlayer extends PlayerImpl {
return;
}
if (logger.isDebugEnabled()) {
logger.debug("Setting game priority for " + getId() + " [" + DebugUtil.getMethodNameWithSource(1) + ']');
logger.debug("Setting game priority for " + getId() + " [" + DebugUtil.getMethodNameWithSource(1, "method") + ']');
}
game.getState().setPriorityPlayerId(getId());
}
@ -328,7 +328,7 @@ public class HumanPlayer extends PlayerImpl {
while (loop) {
// start waiting for next answer
response.clear();
response.setActiveAction(game, DebugUtil.getMethodNameWithSource(1));
response.setActiveAction(game, DebugUtil.getMethodNameWithSource(1, "method"));
game.resumeTimer(getTurnControlledBy());
responseOpenedForAnswer = true;