fix(接口测试): 修复文档断言类型不一致的缺陷
--bug=1028297 --user=王孝刚 【接口测试】test-断言-文档断言-跟随api定义-数值类型显示为bigdecimal https://www.tapd.cn/55049933/s/1402134
This commit is contained in:
parent
3c64217203
commit
379991d3ab
|
@ -73,7 +73,7 @@ public class DocumentUtils {
|
||||||
String type = object.getClass().getName().substring(object.getClass().getName().lastIndexOf(".") + 1);
|
String type = object.getClass().getName().substring(object.getClass().getName().lastIndexOf(".") + 1);
|
||||||
if (StringUtils.equalsIgnoreCase("Integer", type)) {
|
if (StringUtils.equalsIgnoreCase("Integer", type)) {
|
||||||
return type.toLowerCase();
|
return type.toLowerCase();
|
||||||
} else if (StringUtils.equalsAnyIgnoreCase(type, "integer", "float", "long", "double")) {
|
} else if (StringUtils.equalsAnyIgnoreCase(type, "integer", "float", "long", "double", "short", "byte", "bigdecimal", "biginteger")) {
|
||||||
return "number";
|
return "number";
|
||||||
} else if (StringUtils.indexOfAny(type, "Array", "List") != -1) {
|
} else if (StringUtils.indexOfAny(type, "Array", "List") != -1) {
|
||||||
return "array";
|
return "array";
|
||||||
|
|
Loading…
Reference in New Issue