}
}
//真假的返回值
if ("boolean".equals(rerultType) || "Boolean".equals(rerultType)) {
if (o != null) {
Boolean b= new Boolean(o.toString());
rsString = b? "真":"假";
}
}
//list类型返回值(只取第一行即可)
if ("List".equals(rerultType)) {
if (o != null)
{
List list = (List)o;
rsString = "返回List记录,记录条数:"+list.size() ;
}
}
//Map类型返回值
if ("Map".equals(rerultType)) {
//System.out.println(o);
if (o != null) {
Map map = (Map) o;
if (map != null && map.size() > 0)
rsString = map.toString();
}
}
return rsString;
}
/**
* 将源传入,转化为数组对象
* @param source
* @return
*/
private static String[] getParams(String source)
{
if(source!=null && !"".equals(source))
{
String[] arr = source.split(PARAMS_SPLIT);
return arr;
}
return null;
}
文章来源于领测软件测试网 https://www.ltesting.net/