diff --git a/src/test/java/com/dispose/controller/DeviceNodeInfoControllerTest.java b/src/test/java/com/dispose/controller/DeviceNodeInfoControllerTest.java index 679666ff..35e67bc6 100644 --- a/src/test/java/com/dispose/controller/DeviceNodeInfoControllerTest.java +++ b/src/test/java/com/dispose/controller/DeviceNodeInfoControllerTest.java @@ -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 verList = objectMapper.readValue(msgContent, new TypeReference>() { - }); - //VersionListRsp versionListRsp = objectMapper.readValue(msgContent, VersionListRsp.class); - //List verList = versionListRsp.getItems(); + VersionListRsp versionListRsp = objectMapper.readValue(msgContent, VersionListRsp.class); + List 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 verList = objectMapper.readValue(msgContent, new TypeReference>() { - }); - - //VersionListRsp versionListRsp = objectMapper.readValue(msgContent, VersionListRsp.class); - //List verList = versionListRsp.getItems(); + VersionListRsp versionListRsp = objectMapper.readValue(msgContent, VersionListRsp.class); + List verList = versionListRsp.getItems(); for (VersionRsp versionRsp : verList ) {