REM:
1. 修改获取能力节点信息接口测试的代码,响应结构修改为items
This commit is contained in:
chenlinghy 2020-05-20 09:30:44 +08:00
parent 8c116cf4e8
commit 7ba2a162e3
1 changed files with 4 additions and 12 deletions

View File

@ -23,7 +23,6 @@ import com.dispose.pojo.vo.information.VersionListRsp;
import com.dispose.pojo.vo.information.VersionRsp;
import com.dispose.service.DisposeNodeManager;
import com.dispose.service.UserAccountService;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Assert;
import org.junit.FixMethodOrder;
@ -155,11 +154,8 @@ public class DeviceNodeInfoControllerTest extends InitTestEnvironment {
String msgContent = verifyRep(ver, reqTimeStamp);
System.out.print("msgContent=" + msgContent);
//将json字符串转为VersionRsp类
List<VersionRsp> verList = objectMapper.readValue(msgContent, new TypeReference<List<VersionRsp>>() {
});
//VersionListRsp versionListRsp = objectMapper.readValue(msgContent, VersionListRsp.class);
//List<VersionRsp> verList = versionListRsp.getItems();
VersionListRsp versionListRsp = objectMapper.readValue(msgContent, VersionListRsp.class);
List<VersionRsp> verList = versionListRsp.getItems();
for (VersionRsp versionRsp : verList
) {
@ -203,15 +199,11 @@ public class DeviceNodeInfoControllerTest extends InitTestEnvironment {
.getResponse()
.getContentAsString();
String msgContent = verifyRep(verAll, reqTimeStamp);
System.out.print("msgContent=" + msgContent);
List<VersionRsp> verList = objectMapper.readValue(msgContent, new TypeReference<List<VersionRsp>>() {
});
//VersionListRsp versionListRsp = objectMapper.readValue(msgContent, VersionListRsp.class);
//List<VersionRsp> verList = versionListRsp.getItems();
VersionListRsp versionListRsp = objectMapper.readValue(msgContent, VersionListRsp.class);
List<VersionRsp> verList = versionListRsp.getItems();
for (VersionRsp versionRsp : verList
) {