parent
63ef3e0435
commit
8c116cf4e8
|
@ -771,10 +771,11 @@ public class DeviceNodeInfoControllerQATest extends InitTestEnvironment {
|
|||
|
||||
DeviceCapacityRsp deviceCapacityRsp = objectMapper.readValue(verifyResp(capacity), DeviceCapacityRsp.class);
|
||||
deviceCapacityRsp.getItems().forEach(v -> {
|
||||
Assert.assertNotNull(v.getId());
|
||||
Assert.assertNotNull(v.getStatus());
|
||||
Assert.assertNotNull(v.getMessage());
|
||||
|
||||
if (v.getStatus() == 0) {
|
||||
Assert.assertNotNull(v.getId());
|
||||
Assert.assertEquals(String.valueOf(v.getStatus()), String.valueOf(ErrorCode.ERR_OK.getCode()));
|
||||
} else {
|
||||
Assert.assertEquals(String.valueOf(v.getStatus()), String.valueOf(ErrorCode.ERR_NOSUCHDEVICE.getCode()));
|
||||
|
@ -808,10 +809,11 @@ public class DeviceNodeInfoControllerQATest extends InitTestEnvironment {
|
|||
|
||||
DeviceCapacityRsp deviceCapacityRsp = objectMapper.readValue(verifyResp(capacity), DeviceCapacityRsp.class);
|
||||
deviceCapacityRsp.getItems().forEach(v -> {
|
||||
Assert.assertNotNull(v.getId());
|
||||
Assert.assertNotNull(v.getStatus());
|
||||
Assert.assertNotNull(v.getMessage());
|
||||
|
||||
if (v.getStatus() == 0) {
|
||||
Assert.assertNotNull(v.getId());
|
||||
Assert.assertEquals(String.valueOf(v.getStatus()), String.valueOf(ErrorCode.ERR_OK.getCode()));
|
||||
} else {
|
||||
Assert.assertEquals(String.valueOf(v.getStatus()), String.valueOf(ErrorCode.ERR_NOSUCHDEVICE.getCode()));
|
||||
|
@ -845,10 +847,11 @@ public class DeviceNodeInfoControllerQATest extends InitTestEnvironment {
|
|||
|
||||
DeviceCapacityRsp deviceCapacityRsp = objectMapper.readValue(verifyResp(capacity), DeviceCapacityRsp.class);
|
||||
deviceCapacityRsp.getItems().forEach(v -> {
|
||||
Assert.assertNotNull(v.getId());
|
||||
Assert.assertNotNull(v.getStatus());
|
||||
Assert.assertNotNull(v.getMessage());
|
||||
|
||||
if (v.getStatus() == 0) {
|
||||
Assert.assertNotNull(v.getId());
|
||||
Assert.assertEquals(String.valueOf(v.getStatus()), String.valueOf(ErrorCode.ERR_OK.getCode()));
|
||||
} else {
|
||||
Assert.assertEquals(String.valueOf(v.getStatus()), String.valueOf(ErrorCode.ERR_NOSUCHDEVICE.getCode()));
|
||||
|
@ -1023,10 +1026,11 @@ public class DeviceNodeInfoControllerQATest extends InitTestEnvironment {
|
|||
|
||||
DeviceCapacityRsp deviceCapacityRsp = objectMapper.readValue(verifyResp(protectedIp), DeviceCapacityRsp.class);
|
||||
deviceCapacityRsp.getItems().forEach(v -> {
|
||||
Assert.assertNotNull(v.getId());
|
||||
Assert.assertNotNull(v.getStatus());
|
||||
Assert.assertNotNull(v.getMessage());
|
||||
|
||||
if (v.getStatus() == 0) {
|
||||
Assert.assertNotNull(v.getId());
|
||||
Assert.assertEquals(String.valueOf(v.getStatus()), String.valueOf(ErrorCode.ERR_OK.getCode()));
|
||||
} else {
|
||||
Assert.assertEquals(String.valueOf(v.getStatus()), String.valueOf(ErrorCode.ERR_NOSUCHDEVICE.getCode()));
|
||||
|
@ -1062,10 +1066,11 @@ public class DeviceNodeInfoControllerQATest extends InitTestEnvironment {
|
|||
|
||||
DeviceCapacityRsp deviceCapacityRsp = objectMapper.readValue(verifyResp(protectedIp), DeviceCapacityRsp.class);
|
||||
deviceCapacityRsp.getItems().forEach(v -> {
|
||||
Assert.assertNotNull(v.getId());
|
||||
Assert.assertNotNull(v.getStatus());
|
||||
Assert.assertNotNull(v.getMessage());
|
||||
|
||||
if (v.getStatus() == 0) {
|
||||
Assert.assertNotNull(v.getId());
|
||||
Assert.assertEquals(String.valueOf(v.getStatus()), String.valueOf(ErrorCode.ERR_OK.getCode()));
|
||||
} else {
|
||||
Assert.assertEquals(String.valueOf(v.getStatus()), String.valueOf(ErrorCode.ERR_NOSUCHDEVICE.getCode()));
|
||||
|
@ -1102,10 +1107,11 @@ public class DeviceNodeInfoControllerQATest extends InitTestEnvironment {
|
|||
|
||||
DeviceCapacityRsp deviceCapacityRsp = objectMapper.readValue(verifyResp(protectedIp), DeviceCapacityRsp.class);
|
||||
deviceCapacityRsp.getItems().forEach(v -> {
|
||||
Assert.assertNotNull(v.getId());
|
||||
Assert.assertNotNull(v.getStatus());
|
||||
Assert.assertNotNull(v.getMessage());
|
||||
|
||||
if (v.getStatus() == 0) {
|
||||
Assert.assertNotNull(v.getId());
|
||||
Assert.assertEquals(String.valueOf(v.getStatus()), String.valueOf(ErrorCode.ERR_OK.getCode()));
|
||||
} else {
|
||||
Assert.assertEquals(String.valueOf(v.getStatus()), String.valueOf(ErrorCode.ERR_NOSUCHDEVICE.getCode()));
|
||||
|
@ -1291,26 +1297,27 @@ public class DeviceNodeInfoControllerQATest extends InitTestEnvironment {
|
|||
for (NodeTaskData taskData : rspInfo.getItems()
|
||||
) {
|
||||
Assert.assertNotNull(taskData);
|
||||
Assert.assertNotNull(taskData.getId());
|
||||
Assert.assertNotNull(taskData.getStatus());
|
||||
Assert.assertNotNull(taskData.getMessage());
|
||||
|
||||
if (taskData.getStatus() == 0) {
|
||||
Assert.assertNotNull(taskData.getId());
|
||||
Assert.assertNotNull(taskData.getTaskArray());
|
||||
|
||||
for (TaskInfoData taskInfoData : taskData.getTaskArray()
|
||||
) {
|
||||
Assert.assertNotNull(taskInfoData);
|
||||
Assert.assertNotNull(taskInfoData.getTaskId());
|
||||
Assert.assertNotNull(taskInfoData.getType());
|
||||
Assert.assertNotNull(taskInfoData.getStartTime());
|
||||
Assert.assertNotNull(taskInfoData.getDisposeTime());
|
||||
Assert.assertNotNull(taskInfoData.getDisposeIp());
|
||||
}
|
||||
|
||||
Assert.assertEquals(Long.valueOf(taskData.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode()));
|
||||
} else {
|
||||
Assert.assertNotEquals(Long.valueOf(taskData.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode()));
|
||||
}
|
||||
|
||||
Assert.assertNotNull(taskData.getTaskArray());
|
||||
for (TaskInfoData taskInfoData : taskData.getTaskArray()
|
||||
) {
|
||||
Assert.assertNotNull(taskInfoData);
|
||||
Assert.assertNotNull(taskInfoData.getTaskId());
|
||||
Assert.assertNotNull(taskInfoData.getType());
|
||||
Assert.assertNotNull(taskInfoData.getStartTime());
|
||||
Assert.assertNotNull(taskInfoData.getDisposeTime());
|
||||
Assert.assertNotNull(taskInfoData.getDisposeIp());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1345,26 +1352,27 @@ public class DeviceNodeInfoControllerQATest extends InitTestEnvironment {
|
|||
for (NodeTaskData taskData : rspInfo.getItems()
|
||||
) {
|
||||
Assert.assertNotNull(taskData);
|
||||
Assert.assertNotNull(taskData.getId());
|
||||
Assert.assertNotNull(taskData.getStatus());
|
||||
Assert.assertNotNull(taskData.getMessage());
|
||||
|
||||
if (taskData.getStatus() == 0) {
|
||||
Assert.assertNotNull(taskData.getId());
|
||||
Assert.assertNotNull(taskData.getTaskArray());
|
||||
|
||||
for (TaskInfoData taskInfoData : taskData.getTaskArray()
|
||||
) {
|
||||
Assert.assertNotNull(taskInfoData);
|
||||
Assert.assertNotNull(taskInfoData.getTaskId());
|
||||
Assert.assertNotNull(taskInfoData.getType());
|
||||
Assert.assertNotNull(taskInfoData.getStartTime());
|
||||
Assert.assertNotNull(taskInfoData.getDisposeTime());
|
||||
Assert.assertNotNull(taskInfoData.getDisposeIp());
|
||||
}
|
||||
|
||||
Assert.assertEquals(Long.valueOf(taskData.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode()));
|
||||
} else {
|
||||
Assert.assertNotEquals(Long.valueOf(taskData.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode()));
|
||||
}
|
||||
|
||||
Assert.assertNotNull(taskData.getTaskArray());
|
||||
for (TaskInfoData taskInfoData : taskData.getTaskArray()
|
||||
) {
|
||||
Assert.assertNotNull(taskInfoData);
|
||||
Assert.assertNotNull(taskInfoData.getTaskId());
|
||||
Assert.assertNotNull(taskInfoData.getType());
|
||||
Assert.assertNotNull(taskInfoData.getStartTime());
|
||||
Assert.assertNotNull(taskInfoData.getDisposeTime());
|
||||
Assert.assertNotNull(taskInfoData.getDisposeIp());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1523,27 +1531,28 @@ public class DeviceNodeInfoControllerQATest extends InitTestEnvironment {
|
|||
for (NodeTaskData taskData : rspInfo.getItems()
|
||||
) {
|
||||
Assert.assertNotNull(taskData);
|
||||
Assert.assertNotNull(taskData.getId());
|
||||
Assert.assertNotNull(taskData.getStatus());
|
||||
Assert.assertNotNull(taskData.getMessage());
|
||||
|
||||
if (taskData.getStatus() == 0) {
|
||||
Assert.assertNotNull(taskData.getId());
|
||||
Assert.assertNotNull(taskData.getTaskArray());
|
||||
|
||||
for (TaskInfoData taskInfoData : taskData.getTaskArray()
|
||||
) {
|
||||
Assert.assertNotNull(taskInfoData);
|
||||
Assert.assertNotNull(taskInfoData.getTaskId());
|
||||
Assert.assertNotNull(taskInfoData.getCurrentStatus());
|
||||
Assert.assertNotNull(taskInfoData.getType());
|
||||
Assert.assertNotNull(taskInfoData.getStartTime());
|
||||
Assert.assertNotNull(taskInfoData.getDisposeTime());
|
||||
Assert.assertNotNull(taskInfoData.getDisposeIp());
|
||||
}
|
||||
|
||||
Assert.assertEquals(Long.valueOf(taskData.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode()));
|
||||
} else {
|
||||
Assert.assertNotEquals(Long.valueOf(taskData.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode()));
|
||||
}
|
||||
|
||||
Assert.assertNotNull(taskData.getTaskArray());
|
||||
for (TaskInfoData taskInfoData : taskData.getTaskArray()
|
||||
) {
|
||||
Assert.assertNotNull(taskInfoData);
|
||||
Assert.assertNotNull(taskInfoData.getTaskId());
|
||||
Assert.assertNotNull(taskInfoData.getCurrentStatus());
|
||||
Assert.assertNotNull(taskInfoData.getType());
|
||||
Assert.assertNotNull(taskInfoData.getStartTime());
|
||||
Assert.assertNotNull(taskInfoData.getDisposeTime());
|
||||
Assert.assertNotNull(taskInfoData.getDisposeIp());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1778,6 +1787,9 @@ public class DeviceNodeInfoControllerQATest extends InitTestEnvironment {
|
|||
for (DisposeNodeData disposeNodeData : rspInfo.getItems()
|
||||
) {
|
||||
Assert.assertNotNull(disposeNodeData);
|
||||
Assert.assertNotNull(disposeNodeData.getStatus());
|
||||
Assert.assertNotNull(disposeNodeData.getMessage());
|
||||
|
||||
if (disposeNodeData.getStatus() == 0) {
|
||||
Assert.assertEquals(Long.valueOf(disposeNodeData.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode()));
|
||||
Assert.assertNotNull(disposeNodeData.getId());
|
||||
|
@ -1787,8 +1799,6 @@ public class DeviceNodeInfoControllerQATest extends InitTestEnvironment {
|
|||
} else {
|
||||
Assert.assertNotEquals(Long.valueOf(disposeNodeData.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode()));
|
||||
}
|
||||
Assert.assertNotNull(disposeNodeData.getStatus());
|
||||
Assert.assertNotNull(disposeNodeData.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1822,6 +1832,9 @@ public class DeviceNodeInfoControllerQATest extends InitTestEnvironment {
|
|||
for (DisposeNodeData disposeNodeData : rspInfo.getItems()
|
||||
) {
|
||||
Assert.assertNotNull(disposeNodeData);
|
||||
Assert.assertNotNull(disposeNodeData.getStatus());
|
||||
Assert.assertNotNull(disposeNodeData.getMessage());
|
||||
|
||||
if (disposeNodeData.getStatus() == 0) {
|
||||
Assert.assertEquals(Long.valueOf(disposeNodeData.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode()));
|
||||
Assert.assertNotNull(disposeNodeData.getId());
|
||||
|
@ -1831,8 +1844,6 @@ public class DeviceNodeInfoControllerQATest extends InitTestEnvironment {
|
|||
} else {
|
||||
Assert.assertNotEquals(Long.valueOf(disposeNodeData.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode()));
|
||||
}
|
||||
Assert.assertNotNull(disposeNodeData.getStatus());
|
||||
Assert.assertNotNull(disposeNodeData.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1865,6 +1876,9 @@ public class DeviceNodeInfoControllerQATest extends InitTestEnvironment {
|
|||
for (DisposeNodeData disposeNodeData : rspInfo.getItems()
|
||||
) {
|
||||
Assert.assertNotNull(disposeNodeData);
|
||||
Assert.assertNotNull(disposeNodeData.getStatus());
|
||||
Assert.assertNotNull(disposeNodeData.getMessage());
|
||||
|
||||
if (disposeNodeData.getStatus() == 0) {
|
||||
Assert.assertEquals(Long.valueOf(disposeNodeData.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode()));
|
||||
Assert.assertNotNull(disposeNodeData.getId());
|
||||
|
@ -1874,8 +1888,6 @@ public class DeviceNodeInfoControllerQATest extends InitTestEnvironment {
|
|||
} else {
|
||||
Assert.assertNotEquals(Long.valueOf(disposeNodeData.getStatus()), Long.valueOf(ErrorCode.ERR_OK.getCode()));
|
||||
}
|
||||
Assert.assertNotNull(disposeNodeData.getStatus());
|
||||
Assert.assertNotNull(disposeNodeData.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ 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,10 +156,10 @@ public class DeviceNodeInfoControllerTest extends InitTestEnvironment {
|
|||
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();
|
||||
List<VersionRsp> verList = objectMapper.readValue(msgContent, new TypeReference<List<VersionRsp>>() {
|
||||
});
|
||||
//VersionListRsp versionListRsp = objectMapper.readValue(msgContent, VersionListRsp.class);
|
||||
//List<VersionRsp> verList = versionListRsp.getItems();
|
||||
|
||||
for (VersionRsp versionRsp : verList
|
||||
) {
|
||||
|
@ -206,10 +207,11 @@ public class DeviceNodeInfoControllerTest extends InitTestEnvironment {
|
|||
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();
|
||||
List<VersionRsp> verList = objectMapper.readValue(msgContent, new TypeReference<List<VersionRsp>>() {
|
||||
});
|
||||
|
||||
//VersionListRsp versionListRsp = objectMapper.readValue(msgContent, VersionListRsp.class);
|
||||
//List<VersionRsp> verList = versionListRsp.getItems();
|
||||
|
||||
for (VersionRsp versionRsp : verList
|
||||
) {
|
||||
|
|
Loading…
Reference in New Issue