OCT REM:[修改设备信息接口QA测试类:1、删除获取处置设备版本信息接口id为整型测试用例 2、删除获取处置设备信息接口id为整型测试用例 3、删除链路链接接口id为整型测试用例]
This commit is contained in:
parent
cae33f5b77
commit
cbdfb653a7
|
@ -286,33 +286,6 @@ public class DeviceNodeInfoControllerQATest extends InitTestEnvironment{
|
|||
Assert.assertEquals(versionRsp.getMessage(), ErrorCode.ERR_PARAMEXCEPTION.getMsg());
|
||||
}
|
||||
|
||||
/**
|
||||
* A 8 get version id integer exception test.
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Test
|
||||
public void a8_getVersionIdIntegerExceptionTest() throws Exception {
|
||||
String reqData = "{\"ver\":2,\"cryptoType\":0,\"timeStamp\":1587604308040,\"msgContent\":\"{\\\"id\\\":123}\"}";
|
||||
String ver = mockMvc.perform(MockMvcRequestBuilders
|
||||
.post("/information/version")
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.header("Authorization", "Bearer " + getLogToken())
|
||||
.content(reqData))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMEXCEPTION.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
String msgContent = verifyResp(ver);
|
||||
VersionRsp versionRsp = objectMapper.readValue(msgContent, new TypeReference<VersionRsp>() {
|
||||
});
|
||||
|
||||
Assert.assertEquals(String.valueOf(versionRsp.getStatus()),
|
||||
String.valueOf(ErrorCode.ERR_PARAMEXCEPTION.getCode()));
|
||||
Assert.assertEquals(versionRsp.getMessage(), ErrorCode.ERR_PARAMEXCEPTION.getMsg());
|
||||
}
|
||||
|
||||
/**
|
||||
* B 1 get device info normal one exist device test.
|
||||
*
|
||||
|
@ -521,30 +494,6 @@ public class DeviceNodeInfoControllerQATest extends InitTestEnvironment{
|
|||
Assert.assertTrue(msgContent.contains(ErrorCode.ERR_PARAMEXCEPTION.getMsg()));
|
||||
}
|
||||
|
||||
/**
|
||||
* B 8 get device info id integer exception test.
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Test
|
||||
public void b8_getDeviceInfoIdIntegerExceptionTest() throws Exception{
|
||||
String reqData = "{\"ver\":2,\"cryptoType\":0,\"timeStamp\":1587604308040,\"msgContent\":\"{\\\"id\\\":123}\"}";
|
||||
String deviceInfo = mockMvc.perform(MockMvcRequestBuilders
|
||||
.post("/information/deviceinfo")
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.header("Authorization", "Bearer " + getLogToken())
|
||||
.content(reqData))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMEXCEPTION.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
||||
String msgContent = verifyResp(deviceInfo);
|
||||
Assert.assertTrue(msgContent.contains(String.valueOf(ErrorCode.ERR_PARAMEXCEPTION.getCode())));
|
||||
Assert.assertTrue(msgContent.contains(ErrorCode.ERR_PARAMEXCEPTION.getMsg()));
|
||||
}
|
||||
|
||||
/**
|
||||
* C 1 get link status normal one online device test.
|
||||
*
|
||||
|
@ -765,30 +714,6 @@ public class DeviceNodeInfoControllerQATest extends InitTestEnvironment{
|
|||
Assert.assertTrue(msgContent.contains(ErrorCode.ERR_PARAMEXCEPTION.getMsg()));
|
||||
}
|
||||
|
||||
/**
|
||||
* C 8 get link status id integer exception test.
|
||||
*
|
||||
* @throws Exception the exception
|
||||
*/
|
||||
@Test
|
||||
public void c8_getLinkStatusIdIntegerExceptionTest() throws Exception {
|
||||
String reqData = "{\"ver\":2,\"cryptoType\":0,\"timeStamp\":1587604308040,\"msgContent\":\"{\\\"id\\\":123}\"}";
|
||||
String linkstatus = mockMvc.perform(MockMvcRequestBuilders
|
||||
.post("/information/linkstatus")
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.header("Authorization", "Bearer " + getLogToken())
|
||||
.content(reqData))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMEXCEPTION.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
||||
String msgContent = verifyResp(linkstatus);
|
||||
Assert.assertTrue(msgContent.contains(String.valueOf(ErrorCode.ERR_PARAMEXCEPTION.getCode())));
|
||||
Assert.assertTrue(msgContent.contains(ErrorCode.ERR_PARAMEXCEPTION.getMsg()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify device id exists boolean.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue