fix(接口测试): http协议检查接口内容做非空判断

--user=郭雨琦
This commit is contained in:
guoyuqi 2022-07-06 11:46:07 +08:00 committed by xiaomeinvG
parent de3b0554e1
commit e7bc09ff68
1 changed files with 16 additions and 8 deletions

View File

@ -989,20 +989,28 @@ public class ApiDefinitionService {
if (exApiRequest == null || apiRequest == null) { if (exApiRequest == null || apiRequest == null) {
return false; return false;
} }
if (!StringUtils.equals(exApiRequest.get("headers").toString(), apiRequest.get("headers").toString())) { if (exApiRequest.get("headers") != null && apiRequest.get("headers") != null) {
return true; if (!StringUtils.equals(exApiRequest.get("headers").toString(), apiRequest.get("headers").toString())) {
return true;
}
} }
if (!StringUtils.equals(exApiRequest.get("arguments").toString(), apiRequest.get("arguments").toString())) { if (exApiRequest.get("arguments") != null && apiRequest.get("arguments") != null) {
return true; if (!StringUtils.equals(exApiRequest.get("arguments").toString(), apiRequest.get("arguments").toString())) {
return true;
}
} }
if (!StringUtils.equals(exApiRequest.get("rest").toString(), apiRequest.get("rest").toString())) { if (exApiRequest.get("rest") != null && apiRequest.get("rest") != null) {
return true; if (!StringUtils.equals(exApiRequest.get("rest").toString(), apiRequest.get("rest").toString())) {
return true;
}
} }
if (!StringUtils.equals(exApiRequest.get("body").toString(), apiRequest.get("body").toString())) { if (exApiRequest.get("body") != null && apiRequest.get("body") != null) {
return true; if (!StringUtils.equals(exApiRequest.get("body").toString(), apiRequest.get("body").toString())) {
return true;
}
} }
return false; return false;