forked from External/mage
tests: improved testable dialogs (added source code ref in result table for better IDE navigation, part of #13643, #13638);
This commit is contained in:
parent
4f8eb30e4c
commit
d893d52190
21 changed files with 127 additions and 49 deletions
|
|
@ -3,6 +3,7 @@ package mage.utils.testers;
|
|||
import mage.abilities.Ability;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.util.DebugUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
|
@ -37,12 +38,12 @@ class AnnounceXTestableDialog extends BaseTestableDialog {
|
|||
public void showDialog(Player player, Ability source, Game game, Player opponent) {
|
||||
Player choosingPlayer = this.isYou ? player : opponent;
|
||||
String message = "<font color=green>message</font> with html";
|
||||
int chooseRes;
|
||||
chooseRes = choosingPlayer.announceX(this.min, this.max, message, game, source, this.isMana);
|
||||
String chooseDebugSource = DebugUtil.getMethodNameWithSource(0, "class");
|
||||
int chooseRes = choosingPlayer.announceX(this.min, this.max, message, game, source, this.isMana);
|
||||
List<String> res = new ArrayList<>();
|
||||
res.add(getGroup() + " - " + this.getName() + " selected " + chooseRes);
|
||||
|
||||
((AmountTestableResult) this.getResult()).onFinish(true, res, chooseRes);
|
||||
((AmountTestableResult) this.getResult()).onFinish(chooseDebugSource, true, res, chooseRes);
|
||||
}
|
||||
|
||||
static public void register(TestableDialogsRunner runner) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue