feat(接口自动化): 修复当变量未定义时 影响IF为空或非空判断问题
This commit is contained in:
parent
d258d7b693
commit
6c188f3f88
|
@ -79,13 +79,13 @@ public class MsIfController extends MsTestElement {
|
|||
}
|
||||
|
||||
if (StringUtils.equals(operator, "is empty")) {
|
||||
variable = "!empty(" + variable + ")";
|
||||
variable = variable + "==" + "\"\\" + this.variable + "\"" + "|| empty(" + variable + ")";
|
||||
operator = "";
|
||||
value = "";
|
||||
}
|
||||
|
||||
if (StringUtils.equals(operator, "is not empty")) {
|
||||
variable = "empty(" + variable + ")";
|
||||
variable = variable + "!=" + "\"\\" + this.variable + "\"" + "&& !empty(" + variable + ")";
|
||||
operator = "";
|
||||
value = "";
|
||||
}
|
||||
|
|
|
@ -123,13 +123,13 @@ public class MsLoopController extends MsTestElement {
|
|||
}
|
||||
|
||||
if (StringUtils.equals(operator, "is empty")) {
|
||||
variable = "!empty(" + variable + ")";
|
||||
variable = variable + "==" + "\"\\" + this.whileController.getVariable() + "\"" + "|| empty(" + variable + ")";
|
||||
operator = "";
|
||||
value = "";
|
||||
}
|
||||
|
||||
if (StringUtils.equals(operator, "is not empty")) {
|
||||
variable = "empty(" + variable + ")";
|
||||
variable = variable + "!=" + "\"\\" + this.whileController.getVariable() + "\"" + "&& !empty(" + variable + ")";
|
||||
operator = "";
|
||||
value = "";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue