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