REM:
1. 处理浩瀚设备测试用例在jenkins中无法访问设备报错问题
This commit is contained in:
HuangXin 2020-07-08 08:44:18 +08:00
parent d888e61d8e
commit 121c94a5ba
1 changed files with 201 additions and 163 deletions

View File

@ -1,6 +1,8 @@
package com.dispose.test.haohan; package com.dispose.test.haohan;
import com.dispose.common.GlobalVar;
import com.dispose.common.Http; import com.dispose.common.Http;
import com.dispose.test.Global.InitTestEnvironment;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -18,273 +20,309 @@ import javax.annotation.Resource;
@Slf4j @Slf4j
@SpringBootTest @SpringBootTest
@FixMethodOrder(MethodSorters.NAME_ASCENDING) @FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class HaoHanInterfaceTestCase { public class HaoHanInterfaceTestCase extends InitTestEnvironment {
@Resource @Resource
private ObjectMapper objectMapper; private ObjectMapper objectMapper;
@Override
public void userLogin(){
}
@Test @Test
public void a1_sendTowWhitelistTest() throws JsonProcessingException { public void a1_sendTowWhitelistTest() throws JsonProcessingException {
String jsonRequest = "{\"ip\":\"192.168.1.1\",\"orderFrom\":\"hangyan\"}"; if (!GlobalVar.USED_VIRTUAL_DISPOSE_MODE) {
String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/sendTow", String jsonRequest = "{\"ip\":\"192.168.1.1\",\"orderFrom\":\"hangyan\"}";
null, String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/sendTow",
jsonRequest); null,
jsonRequest);
log.info("Server Return: [{}]", svrReturn); log.info("Server Return: [{}]", svrReturn);
sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class); sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class);
Assert.assertNotNull(result); Assert.assertNotNull(result);
Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_WHITELIST.getMsg()); Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_WHITELIST.getMsg());
Assert.assertEquals(result.getState(), Integer.valueOf(1)); Assert.assertEquals(result.getState(), Integer.valueOf(1));
}
} }
@Test @Test
public void a2_sendTowWhitelistContainsDurationTest() throws JsonProcessingException { public void a2_sendTowWhitelistContainsDurationTest() throws JsonProcessingException {
String jsonRequest = "{\"ip\":\"192.168.1.1\",\"duration\":20, \"orderFrom\":\"hangyan\"}"; if (!GlobalVar.USED_VIRTUAL_DISPOSE_MODE) {
String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/sendTow", String jsonRequest = "{\"ip\":\"192.168.1.1\",\"duration\":20, \"orderFrom\":\"hangyan\"}";
null, String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/sendTow",
jsonRequest); null,
jsonRequest);
log.info("Server Return: [{}]", svrReturn); log.info("Server Return: [{}]", svrReturn);
sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class); sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class);
Assert.assertNotNull(result); Assert.assertNotNull(result);
Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_WHITELIST.getMsg()); Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_WHITELIST.getMsg());
Assert.assertEquals(result.getState(), Integer.valueOf(1)); Assert.assertEquals(result.getState(), Integer.valueOf(1));
}
} }
@Test @Test
public void a3_normalSendTowTest() throws JsonProcessingException { public void a3_normalSendTowTest() throws JsonProcessingException {
String jsonRequest = "{\"ip\":\"192.168.1.2\",\"orderFrom\":\"hangyan\"}"; if (!GlobalVar.USED_VIRTUAL_DISPOSE_MODE) {
String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/sendTow", String jsonRequest = "{\"ip\":\"192.168.1.2\",\"orderFrom\":\"hangyan\"}";
null, String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/sendTow",
jsonRequest); null,
jsonRequest);
log.info("Server Return: [{}]", svrReturn); log.info("Server Return: [{}]", svrReturn);
sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class); sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class);
Assert.assertNotNull(result); Assert.assertNotNull(result);
if (result.getState() == 0) { if (result.getState() == 0) {
Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_OK.getMsg()); Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_OK.getMsg());
Assert.assertNotNull(result.getCleanTaskId()); Assert.assertNotNull(result.getCleanTaskId());
} else { } else {
Assert.assertNotEquals(result.getMsg(), HaoHanErrorCode.ERR_OK.getMsg()); Assert.assertNotEquals(result.getMsg(), HaoHanErrorCode.ERR_OK.getMsg());
}
} }
} }
@Test @Test
public void a4_normalSendTowContainsDurationTest() throws JsonProcessingException { public void a4_normalSendTowContainsDurationTest() throws JsonProcessingException {
String jsonRequest = "{\"ip\":\"192.168.1.20\",\"duration\":20,\"orderFrom\":\"hangyan\"}"; if (!GlobalVar.USED_VIRTUAL_DISPOSE_MODE) {
String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/sendTow", String jsonRequest = "{\"ip\":\"192.168.1.20\",\"duration\":20,\"orderFrom\":\"hangyan\"}";
null, String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/sendTow",
jsonRequest); null,
jsonRequest);
log.info("Server Return: [{}]", svrReturn); log.info("Server Return: [{}]", svrReturn);
sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class); sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class);
Assert.assertNotNull(result); Assert.assertNotNull(result);
if (result.getState() == 0) { if (result.getState() == 0) {
Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_OK.getMsg()); Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_OK.getMsg());
Assert.assertNotNull(result.getCleanTaskId()); Assert.assertNotNull(result.getCleanTaskId());
} else { } else {
Assert.assertNotEquals(result.getMsg(), HaoHanErrorCode.ERR_OK.getMsg()); Assert.assertNotEquals(result.getMsg(), HaoHanErrorCode.ERR_OK.getMsg());
}
} }
} }
@Test @Test
public void a5_sendTowIpErrorTest() throws JsonProcessingException { public void a5_sendTowIpErrorTest() throws JsonProcessingException {
String jsonRequest = "{\"ip\":\"192.168.120\",\"duration\":20,\"orderFrom\":\"hangyan\"}"; if (!GlobalVar.USED_VIRTUAL_DISPOSE_MODE) {
String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/sendTow", String jsonRequest = "{\"ip\":\"192.168.120\",\"duration\":20,\"orderFrom\":\"hangyan\"}";
null, String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/sendTow",
jsonRequest); null,
jsonRequest);
log.info("Server Return: [{}]", svrReturn); log.info("Server Return: [{}]", svrReturn);
sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class); sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class);
Assert.assertNotNull(result); Assert.assertNotNull(result);
Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_DISPOSEIPFORMAT.getMsg()); Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_DISPOSEIPFORMAT.getMsg());
Assert.assertEquals(result.getState(), Integer.valueOf(1)); Assert.assertEquals(result.getState(), Integer.valueOf(1));
}
} }
@Test @Test
public void a6_sendTowDurationErrorTest() throws JsonProcessingException { public void a6_sendTowDurationErrorTest() throws JsonProcessingException {
String jsonRequest = "{\"ip\":\"192.168.1.20\",\"duration\":\"20\",\"orderFrom\":\"hangyan\"}"; if (!GlobalVar.USED_VIRTUAL_DISPOSE_MODE) {
String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/sendTow", String jsonRequest = "{\"ip\":\"192.168.1.20\",\"duration\":\"20\",\"orderFrom\":\"hangyan\"}";
null, String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/sendTow",
jsonRequest); null,
jsonRequest);
log.info("Server Return: [{}]", svrReturn); log.info("Server Return: [{}]", svrReturn);
sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class); sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class);
Assert.assertNotNull(result); Assert.assertNotNull(result);
Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_DURATIONFORMAT.getMsg()); Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_DURATIONFORMAT.getMsg());
Assert.assertEquals(result.getState(), Integer.valueOf(1)); Assert.assertEquals(result.getState(), Integer.valueOf(1));
}
} }
@Test @Test
public void a7_sendTowOrderFromErrorTest() throws JsonProcessingException { public void a7_sendTowOrderFromErrorTest() throws JsonProcessingException {
String jsonRequest = "{\"ip\":\"192.168.1.20\",\"duration\":20,\"orderFrom\":123}"; if (!GlobalVar.USED_VIRTUAL_DISPOSE_MODE) {
String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/sendTow", String jsonRequest = "{\"ip\":\"192.168.1.20\",\"duration\":20,\"orderFrom\":123}";
null, String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/sendTow",
jsonRequest); null,
jsonRequest);
log.info("Server Return: [{}]", svrReturn); log.info("Server Return: [{}]", svrReturn);
sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class); sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class);
Assert.assertNotNull(result); Assert.assertNotNull(result);
Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_ORDERFROMFORMA.getMsg()); Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_ORDERFROMFORMA.getMsg());
Assert.assertEquals(result.getState(), Integer.valueOf(1)); Assert.assertEquals(result.getState(), Integer.valueOf(1));
}
} }
@Test @Test
public void b1_delTowTest() throws JsonProcessingException { public void b1_delTowTest() throws JsonProcessingException {
String jsonRequest = "{\"cleanTaskId\":105,\"orderFrom\":\"hangyan\"}"; if (!GlobalVar.USED_VIRTUAL_DISPOSE_MODE) {
String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/delTow", String jsonRequest = "{\"cleanTaskId\":105,\"orderFrom\":\"hangyan\"}";
null, String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/delTow",
jsonRequest); null,
jsonRequest);
log.info("Server Return: [{}]", svrReturn); log.info("Server Return: [{}]", svrReturn);
sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class); sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class);
Assert.assertNotNull(result); Assert.assertNotNull(result);
if (result.getState() == 0) { if (result.getState() == 0) {
Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_OK.getMsg()); Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_OK.getMsg());
} else { } else {
Assert.assertNotEquals(result.getMsg(), HaoHanErrorCode.ERR_OK.getMsg()); Assert.assertNotEquals(result.getMsg(), HaoHanErrorCode.ERR_OK.getMsg());
}
} }
} }
@Test @Test
public void b2_delTowCleanTaskIdErrorTest() throws JsonProcessingException { public void b2_delTowCleanTaskIdErrorTest() throws JsonProcessingException {
String jsonRequest = "{\"cleanTaskId\":\"105\",\"orderFrom\":\"hangyan\"}"; if (!GlobalVar.USED_VIRTUAL_DISPOSE_MODE) {
String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/delTow", String jsonRequest = "{\"cleanTaskId\":\"105\",\"orderFrom\":\"hangyan\"}";
null, String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/delTow",
jsonRequest); null,
jsonRequest);
log.info("Server Return: [{}]", svrReturn); log.info("Server Return: [{}]", svrReturn);
sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class); sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class);
Assert.assertNotNull(result); Assert.assertNotNull(result);
Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_CLEANTASKIDFORMA.getMsg()); Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_CLEANTASKIDFORMA.getMsg());
Assert.assertEquals(result.getState(), Integer.valueOf(1)); Assert.assertEquals(result.getState(), Integer.valueOf(1));
}
} }
@Test @Test
public void b3_delTowOrderFromErrorTest() throws JsonProcessingException { public void b3_delTowOrderFromErrorTest() throws JsonProcessingException {
String jsonRequest = "{\"cleanTaskId\":105,\"orderFrom\":123}"; if (!GlobalVar.USED_VIRTUAL_DISPOSE_MODE) {
String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/delTow", String jsonRequest = "{\"cleanTaskId\":105,\"orderFrom\":123}";
null, String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/delTow",
jsonRequest); null,
jsonRequest);
log.info("Server Return: [{}]", svrReturn); log.info("Server Return: [{}]", svrReturn);
sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class); sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class);
Assert.assertNotNull(result); Assert.assertNotNull(result);
Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_ORDERFROMFORMA.getMsg()); Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_ORDERFROMFORMA.getMsg());
Assert.assertEquals(result.getState(), Integer.valueOf(1)); Assert.assertEquals(result.getState(), Integer.valueOf(1));
}
} }
@Test @Test
public void c1_allIpFlowTest() throws JsonProcessingException { public void c1_allIpFlowTest() throws JsonProcessingException {
String jsonRequest = "{\"orderFrom\":\"hangyan\"}"; if (!GlobalVar.USED_VIRTUAL_DISPOSE_MODE) {
String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/allIpFlow", String jsonRequest = "{\"orderFrom\":\"hangyan\"}";
null, String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/allIpFlow",
jsonRequest); null,
jsonRequest);
log.info("Server Return: [{}]", svrReturn); log.info("Server Return: [{}]", svrReturn);
allIpFlowResult result = objectMapper.readValue(svrReturn, allIpFlowResult.class); allIpFlowResult result = objectMapper.readValue(svrReturn, allIpFlowResult.class);
Assert.assertNotNull(result); Assert.assertNotNull(result);
if (result.getState() == 0) { if (result.getState() == 0) {
Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_OK.getMsg()); Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_OK.getMsg());
for (allIpFlowData data : result.getData() for (allIpFlowData data : result.getData()
) { ) {
Assert.assertNotNull(data.getIp()); Assert.assertNotNull(data.getIp());
}
} else {
Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_NORUNNINGTASK.getMsg());
} }
} else {
Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_NORUNNINGTASK.getMsg());
} }
} }
@Test @Test
public void c2_allIpFlowTest() throws JsonProcessingException { public void c2_allIpFlowTest() throws JsonProcessingException {
String jsonRequest = "{\"orderFrom\":123}"; if (!GlobalVar.USED_VIRTUAL_DISPOSE_MODE) {
String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/allIpFlow", String jsonRequest = "{\"orderFrom\":123}";
null, String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/allIpFlow",
jsonRequest); null,
jsonRequest);
log.info("Server Return: [{}]", svrReturn); log.info("Server Return: [{}]", svrReturn);
allIpFlowResult result = objectMapper.readValue(svrReturn, allIpFlowResult.class); allIpFlowResult result = objectMapper.readValue(svrReturn, allIpFlowResult.class);
Assert.assertNotNull(result); Assert.assertNotNull(result);
Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_ORDERFROMFORMA.getMsg()); Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_ORDERFROMFORMA.getMsg());
Assert.assertEquals(result.getState(), Integer.valueOf(1)); Assert.assertEquals(result.getState(), Integer.valueOf(1));
}
} }
@Test @Test
public void d1_cleanTaskFlowTest() throws JsonProcessingException { public void d1_cleanTaskFlowTest() throws JsonProcessingException {
String jsonRequest = "{\"cleanTaskId\":119}"; if (!GlobalVar.USED_VIRTUAL_DISPOSE_MODE) {
String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/cleanTaskFlow", String jsonRequest = "{\"cleanTaskId\":119}";
null, String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/cleanTaskFlow",
jsonRequest); null,
jsonRequest);
log.info("Server Return: [{}]", svrReturn); log.info("Server Return: [{}]", svrReturn);
allIpFlowResult result = objectMapper.readValue(svrReturn, allIpFlowResult.class); allIpFlowResult result = objectMapper.readValue(svrReturn, allIpFlowResult.class);
Assert.assertNotNull(result); Assert.assertNotNull(result);
if (result.getState() == 0) { if (result.getState() == 0) {
Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_OK.getMsg()); Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_OK.getMsg());
for (allIpFlowData data : result.getData() for (allIpFlowData data : result.getData()
) { ) {
Assert.assertNotNull(data.getIp()); Assert.assertNotNull(data.getIp());
}
} else {
Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_TASKNOEND.getMsg());
} }
} else {
Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_TASKNOEND.getMsg());
} }
} }
@Test @Test
public void d2_cleanTaskFlowTest() throws JsonProcessingException { public void d2_cleanTaskFlowTest() throws JsonProcessingException {
String jsonRequest = "{\"cleanTaskId\":\"abc\"}"; if (!GlobalVar.USED_VIRTUAL_DISPOSE_MODE) {
String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/cleanTaskFlow", String jsonRequest = "{\"cleanTaskId\":\"abc\"}";
null, String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/cleanTaskFlow",
jsonRequest); null,
jsonRequest);
log.info("Server Return: [{}]", svrReturn); log.info("Server Return: [{}]", svrReturn);
allIpFlowResult result = objectMapper.readValue(svrReturn, allIpFlowResult.class); allIpFlowResult result = objectMapper.readValue(svrReturn, allIpFlowResult.class);
Assert.assertNotNull(result); Assert.assertNotNull(result);
Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_CLEANTASKIDFORMA.getMsg()); Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_CLEANTASKIDFORMA.getMsg());
}
} }
@Test @Test
public void e1_getCleanTaskStateTest() throws JsonProcessingException { public void e1_getCleanTaskStateTest() throws JsonProcessingException {
String jsonRequest = "{\"cleanTaskId\":119}"; if (!GlobalVar.USED_VIRTUAL_DISPOSE_MODE) {
String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/getCleanTaskState", String jsonRequest = "{\"cleanTaskId\":119}";
null, String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/getCleanTaskState",
jsonRequest); null,
jsonRequest);
log.info("Server Return: [{}]", svrReturn); log.info("Server Return: [{}]", svrReturn);
sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class); sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class);
Assert.assertNotNull(result); Assert.assertNotNull(result);
if (result.getState() == 0) { if (result.getState() == 0) {
Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_OK.getMsg()); Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_OK.getMsg());
} else { } else {
Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_NOTASK.getMsg()); Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_NOTASK.getMsg());
}
} }
} }
@Test @Test
public void e2_getCleanTaskStateTest() throws JsonProcessingException { public void e2_getCleanTaskStateTest() throws JsonProcessingException {
String jsonRequest = "{\"cleanTaskId\":\"adb\"}"; if (!GlobalVar.USED_VIRTUAL_DISPOSE_MODE) {
String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/getCleanTaskState", String jsonRequest = "{\"cleanTaskId\":\"adb\"}";
null, String svrReturn = Http.postJson("http://10.88.77.88:18080/DDoSClean/clean/getCleanTaskState",
jsonRequest); null,
jsonRequest);
log.info("Server Return: [{}]", svrReturn); log.info("Server Return: [{}]", svrReturn);
sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class); sendTowResult result = objectMapper.readValue(svrReturn, sendTowResult.class);
Assert.assertNotNull(result); Assert.assertNotNull(result);
Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_CLEANTASKIDFORMA.getMsg()); Assert.assertEquals(result.getMsg(), HaoHanErrorCode.ERR_CLEANTASKIDFORMA.getMsg());
}
} }
} }