parent
e17a6395d2
commit
939645d73e
|
@ -179,7 +179,7 @@ public class AuthControllerQATest extends InitTestEnvironment {
|
|||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.content(reqData))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_USERNOTFOUND.getHttpCode()))
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMS.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
@ -189,7 +189,7 @@ public class AuthControllerQATest extends InitTestEnvironment {
|
|||
Assert.assertNotNull(rspInfo.getMessage());
|
||||
Assert.assertNotNull(rspInfo.getStatus());
|
||||
|
||||
Assert.assertEquals(Long.valueOf(rspInfo.getStatus()), Long.valueOf(ErrorCode.ERR_USERNOTFOUND.getCode()));
|
||||
Assert.assertEquals(Long.valueOf(rspInfo.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMS.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -208,7 +208,7 @@ public class AuthControllerQATest extends InitTestEnvironment {
|
|||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.content(reqData))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_USERNOTFOUND.getHttpCode()))
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMS.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
@ -218,7 +218,7 @@ public class AuthControllerQATest extends InitTestEnvironment {
|
|||
Assert.assertNotNull(rspInfo.getMessage());
|
||||
Assert.assertNotNull(rspInfo.getStatus());
|
||||
|
||||
Assert.assertEquals(Long.valueOf(rspInfo.getStatus()), Long.valueOf(ErrorCode.ERR_USERNOTFOUND.getCode()));
|
||||
Assert.assertEquals(Long.valueOf(rspInfo.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMS.getCode()));
|
||||
}
|
||||
|
||||
|
||||
|
@ -355,7 +355,7 @@ public class AuthControllerQATest extends InitTestEnvironment {
|
|||
.header("Authorization", GlobalVar.STRING_HTTP_AUTH_HEAD + getLogToken())
|
||||
.content(reqData))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_USERNOTFOUND.getHttpCode()))
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMS.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
@ -365,7 +365,7 @@ public class AuthControllerQATest extends InitTestEnvironment {
|
|||
Assert.assertNotNull(rspInfo.getMessage());
|
||||
Assert.assertNotNull(rspInfo.getStatus());
|
||||
|
||||
Assert.assertEquals(Long.valueOf(rspInfo.getStatus()), Long.valueOf(ErrorCode.ERR_USERNOTFOUND.getCode()));
|
||||
Assert.assertEquals(Long.valueOf(rspInfo.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMS.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -384,7 +384,7 @@ public class AuthControllerQATest extends InitTestEnvironment {
|
|||
.header("Authorization", GlobalVar.STRING_HTTP_AUTH_HEAD + getLogToken())
|
||||
.content(reqData))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_USERNOTFOUND.getHttpCode()))
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMS.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
@ -394,6 +394,6 @@ public class AuthControllerQATest extends InitTestEnvironment {
|
|||
Assert.assertNotNull(rspInfo.getMessage());
|
||||
Assert.assertNotNull(rspInfo.getStatus());
|
||||
|
||||
Assert.assertEquals(Long.valueOf(rspInfo.getStatus()), Long.valueOf(ErrorCode.ERR_USERNOTFOUND.getCode()));
|
||||
Assert.assertEquals(Long.valueOf(rspInfo.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMS.getCode()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,18 +103,16 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
.header("Authorization", GlobalVar.STRING_HTTP_AUTH_HEAD + getLogToken())
|
||||
.content(reqDataNoIp))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_OK.getHttpCode()))
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMS.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
||||
StartTaskRsp startTaskRsp = objectMapper.readValue(verifyResp(taskStart), StartTaskRsp.class);
|
||||
ReturnStatus returnStatus = objectMapper.readValue(verifyResp(taskStart), ReturnStatus.class);
|
||||
|
||||
Assert.assertNotNull(startTaskRsp);
|
||||
Assert.assertNotNull(String.valueOf(startTaskRsp.getExpireTime()));
|
||||
Assert.assertNotNull(startTaskRsp.getStatus());
|
||||
Assert.assertNotNull(startTaskRsp.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(startTaskRsp.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMEXCEPTION.getCode()));
|
||||
Assert.assertNotNull(returnStatus.getStatus());
|
||||
Assert.assertNotNull(returnStatus.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMS.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -134,18 +132,16 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
.header("Authorization", GlobalVar.STRING_HTTP_AUTH_HEAD + getLogToken())
|
||||
.content(reqDataNullIp))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_OK.getHttpCode()))
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMS.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
||||
StartTaskRsp startTaskRsp = objectMapper.readValue(verifyResp(taskStart), StartTaskRsp.class);
|
||||
ReturnStatus returnStatus = objectMapper.readValue(verifyResp(taskStart), ReturnStatus.class);
|
||||
|
||||
Assert.assertNotNull(startTaskRsp);
|
||||
Assert.assertNotNull(String.valueOf(startTaskRsp.getExpireTime()));
|
||||
Assert.assertNotNull(startTaskRsp.getStatus());
|
||||
Assert.assertNotNull(startTaskRsp.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(startTaskRsp.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMEXCEPTION.getCode()));
|
||||
Assert.assertNotNull(returnStatus.getStatus());
|
||||
Assert.assertNotNull(returnStatus.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMS.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -164,18 +160,16 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
.header("Authorization", GlobalVar.STRING_HTTP_AUTH_HEAD + getLogToken())
|
||||
.content(reqDataIntegerIp))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_OK.getHttpCode()))
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMS.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
||||
StartTaskRsp startTaskRsp = objectMapper.readValue(verifyResp(taskStart), StartTaskRsp.class);
|
||||
ReturnStatus returnStatus = objectMapper.readValue(verifyResp(taskStart), ReturnStatus.class);
|
||||
|
||||
Assert.assertNotNull(startTaskRsp);
|
||||
Assert.assertNotNull(String.valueOf(startTaskRsp.getExpireTime()));
|
||||
Assert.assertNotNull(startTaskRsp.getStatus());
|
||||
Assert.assertNotNull(startTaskRsp.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(startTaskRsp.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMEXCEPTION.getCode()));
|
||||
Assert.assertNotNull(returnStatus.getStatus());
|
||||
Assert.assertNotNull(returnStatus.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMS.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -194,7 +188,7 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
.header("Authorization", GlobalVar.STRING_HTTP_AUTH_HEAD + getLogToken())
|
||||
.content(reqDataNullId))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMEXCEPTION.getHttpCode()))
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMS.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
@ -203,7 +197,7 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
|
||||
Assert.assertNotNull(returnStatus.getStatus());
|
||||
Assert.assertNotNull(returnStatus.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMEXCEPTION.getCode()));
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMS.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -250,18 +244,16 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
.header("Authorization", GlobalVar.STRING_HTTP_AUTH_HEAD + getLogToken())
|
||||
.content(reqDataNullType))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_OK.getHttpCode()))
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMS.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
||||
StartTaskRsp startTaskRsp = objectMapper.readValue(verifyResp(taskStart), StartTaskRsp.class);
|
||||
ReturnStatus returnStatus = objectMapper.readValue(verifyResp(taskStart), ReturnStatus.class);
|
||||
|
||||
Assert.assertNotNull(startTaskRsp);
|
||||
Assert.assertNotNull(String.valueOf(startTaskRsp.getExpireTime()));
|
||||
Assert.assertNotNull(startTaskRsp.getStatus());
|
||||
Assert.assertNotNull(startTaskRsp.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(startTaskRsp.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMEXCEPTION.getCode()));
|
||||
Assert.assertNotNull(returnStatus.getStatus());
|
||||
Assert.assertNotNull(returnStatus.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMS.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -341,18 +333,16 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
.header("Authorization", GlobalVar.STRING_HTTP_AUTH_HEAD + getLogToken())
|
||||
.content(reqDataStringDisposeTime))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_OK.getHttpCode()))
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMS.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
||||
StartTaskRsp startTaskRsp = objectMapper.readValue(verifyResp(taskStart), StartTaskRsp.class);
|
||||
ReturnStatus returnStatus = objectMapper.readValue(verifyResp(taskStart), ReturnStatus.class);
|
||||
|
||||
Assert.assertNotNull(startTaskRsp);
|
||||
Assert.assertNotNull(String.valueOf(startTaskRsp.getExpireTime()));
|
||||
Assert.assertNotNull(startTaskRsp.getStatus());
|
||||
Assert.assertNotNull(startTaskRsp.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(startTaskRsp.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMEXCEPTION.getCode()));
|
||||
Assert.assertNotNull(returnStatus.getStatus());
|
||||
Assert.assertNotNull(returnStatus.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMS.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -427,7 +417,7 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
.header("Authorization", GlobalVar.STRING_HTTP_AUTH_HEAD + getLogToken())
|
||||
.content(reqData))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMEXCEPTION.getHttpCode()))
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMS.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
@ -436,7 +426,7 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
|
||||
Assert.assertNotNull(returnStatus.getStatus());
|
||||
Assert.assertNotNull(returnStatus.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMEXCEPTION.getCode()));
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMS.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -455,7 +445,7 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
.header("Authorization", GlobalVar.STRING_HTTP_AUTH_HEAD + getLogToken())
|
||||
.content(reqData))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMEXCEPTION.getHttpCode()))
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMS.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
@ -464,7 +454,7 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
|
||||
Assert.assertNotNull(returnStatus.getStatus());
|
||||
Assert.assertNotNull(returnStatus.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMEXCEPTION.getCode()));
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMS.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -483,18 +473,16 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
.header("Authorization", GlobalVar.STRING_HTTP_AUTH_HEAD + getLogToken())
|
||||
.content(reqData))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_OK.getHttpCode()))
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMS.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
||||
TaskInfoRsp rspStatus = objectMapper.readValue(verifyResp(taskStopByIpNoDisposeIp), TaskInfoRsp.class);
|
||||
ReturnStatus returnStatus = objectMapper.readValue(verifyResp(taskStopByIpNoDisposeIp), ReturnStatus.class);
|
||||
|
||||
rspStatus.getItems().forEach(v -> {
|
||||
Assert.assertNotNull(v.getStatus());
|
||||
Assert.assertNotNull(v.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(v.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMEXCEPTION.getCode()));
|
||||
});
|
||||
Assert.assertNotNull(returnStatus.getStatus());
|
||||
Assert.assertNotNull(returnStatus.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMS.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -513,18 +501,16 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
.header("Authorization", GlobalVar.STRING_HTTP_AUTH_HEAD + getLogToken())
|
||||
.content(reqData))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_OK.getHttpCode()))
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMS.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
||||
TaskInfoRsp rspStatus = objectMapper.readValue(verifyResp(taskStopByIpNullDisposeIp), TaskInfoRsp.class);
|
||||
ReturnStatus returnStatus = objectMapper.readValue(verifyResp(taskStopByIpNullDisposeIp), ReturnStatus.class);
|
||||
|
||||
rspStatus.getItems().forEach(v -> {
|
||||
Assert.assertNotNull(v.getStatus());
|
||||
Assert.assertNotNull(v.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(v.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMEXCEPTION.getCode()));
|
||||
});
|
||||
Assert.assertNotNull(returnStatus.getStatus());
|
||||
Assert.assertNotNull(returnStatus.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMS.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -543,18 +529,16 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
.header("Authorization", GlobalVar.STRING_HTTP_AUTH_HEAD + getLogToken())
|
||||
.content(reqData))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_OK.getHttpCode()))
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMS.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
||||
TaskInfoRsp rspStatus = objectMapper.readValue(verifyResp(taskStopByIpErrorDisposeIp), TaskInfoRsp.class);
|
||||
ReturnStatus returnStatus = objectMapper.readValue(verifyResp(taskStopByIpErrorDisposeIp), ReturnStatus.class);
|
||||
|
||||
rspStatus.getItems().forEach(v -> {
|
||||
Assert.assertNotNull(v.getStatus());
|
||||
Assert.assertNotNull(v.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(v.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMEXCEPTION.getCode()));
|
||||
});
|
||||
Assert.assertNotNull(returnStatus.getStatus());
|
||||
Assert.assertNotNull(returnStatus.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMS.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -573,18 +557,16 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
.header("Authorization", GlobalVar.STRING_HTTP_AUTH_HEAD + getLogToken())
|
||||
.content(reqData))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_OK.getHttpCode()))
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMS.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
||||
TaskInfoRsp rspStatus = objectMapper.readValue(verifyResp(taskStopByIpIntegerDisposeIp), TaskInfoRsp.class);
|
||||
ReturnStatus returnStatus = objectMapper.readValue(verifyResp(taskStopByIpIntegerDisposeIp), ReturnStatus.class);
|
||||
|
||||
rspStatus.getItems().forEach(v -> {
|
||||
Assert.assertNotNull(v.getStatus());
|
||||
Assert.assertNotNull(v.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(v.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMEXCEPTION.getCode()));
|
||||
});
|
||||
Assert.assertNotNull(returnStatus.getStatus());
|
||||
Assert.assertNotNull(returnStatus.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMS.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -631,7 +613,7 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
.header("Authorization", GlobalVar.STRING_HTTP_AUTH_HEAD + getLogToken())
|
||||
.content(reqData))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMEXCEPTION.getHttpCode()))
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMS.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
@ -640,7 +622,7 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
|
||||
Assert.assertNotNull(returnStatus.getStatus());
|
||||
Assert.assertNotNull(returnStatus.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMEXCEPTION.getCode()));
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMS.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -733,7 +715,7 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
.header("Authorization", GlobalVar.STRING_HTTP_AUTH_HEAD + getLogToken())
|
||||
.content(reqData))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMEXCEPTION.getHttpCode()))
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMS.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
@ -742,7 +724,7 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
|
||||
Assert.assertNotNull(returnStatus.getStatus());
|
||||
Assert.assertNotNull(returnStatus.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMEXCEPTION.getCode()));
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMS.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -761,7 +743,7 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
.header("Authorization", GlobalVar.STRING_HTTP_AUTH_HEAD + getLogToken())
|
||||
.content(reqData))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMEXCEPTION.getHttpCode()))
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMS.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
@ -770,7 +752,7 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
|
||||
Assert.assertNotNull(returnStatus.getStatus());
|
||||
Assert.assertNotNull(returnStatus.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMEXCEPTION.getCode()));
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMS.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -817,7 +799,7 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
.header("Authorization", GlobalVar.STRING_HTTP_AUTH_HEAD + getLogToken())
|
||||
.content(reqData))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMEXCEPTION.getHttpCode()))
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMS.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
@ -826,7 +808,7 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
|
||||
Assert.assertNotNull(returnStatus.getStatus());
|
||||
Assert.assertNotNull(returnStatus.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMEXCEPTION.getCode()));
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMS.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -980,7 +962,7 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
.header("Authorization", GlobalVar.STRING_HTTP_AUTH_HEAD + getLogToken())
|
||||
.content(reqData))
|
||||
.andDo(print()).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMEXCEPTION.getHttpCode()))
|
||||
.andExpect(jsonPath("$.code").value(ErrorCode.ERR_PARAMS.getHttpCode()))
|
||||
.andReturn()
|
||||
.getResponse()
|
||||
.getContentAsString();
|
||||
|
@ -989,7 +971,7 @@ public class TaskControllerQATest extends InitTestEnvironment {
|
|||
|
||||
Assert.assertNotNull(returnStatus.getStatus());
|
||||
Assert.assertNotNull(returnStatus.getMessage());
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMEXCEPTION.getCode()));
|
||||
Assert.assertEquals(Long.valueOf(returnStatus.getStatus()), Long.valueOf(ErrorCode.ERR_PARAMS.getCode()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue