forked from External/mage
tests: improved testable dialogs (added assert messages in result table, added single dialog debugging, part of #13643, #13638);
This commit is contained in:
parent
7a44ee2a97
commit
4732fdf527
10 changed files with 166 additions and 53 deletions
|
|
@ -23,7 +23,7 @@ public class TargetTestableResult extends BaseTestableResult {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean getResAssert() {
|
||||
public String getResAssert() {
|
||||
if (!this.aiAssertEnabled) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -35,16 +35,22 @@ public class TargetTestableResult extends BaseTestableResult {
|
|||
|
||||
// wrong choose
|
||||
if (this.getResStatus() != this.aiAssertResStatus) {
|
||||
return false;
|
||||
return String.format("Wrong status: need %s, but get %s",
|
||||
this.aiAssertResStatus,
|
||||
this.getResStatus()
|
||||
);
|
||||
}
|
||||
|
||||
// wrong targets
|
||||
if (this.target.getTargets().size() != this.aiAssertTargetsCount) {
|
||||
return false;
|
||||
return String.format("Wrong targets count: need %d, but get %d",
|
||||
this.aiAssertTargetsCount,
|
||||
this.target.getTargets().size()
|
||||
);
|
||||
}
|
||||
|
||||
// all fine
|
||||
return true;
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue