Commit 8513e21f authored by 龚小红's avatar 龚小红

1.增加客户资料配置的测试用例

parent 1609e2b2
...@@ -742,8 +742,13 @@ public class CheckTask implements Authorization { ...@@ -742,8 +742,13 @@ public class CheckTask implements Authorization {
params.put("id", kycId); params.put("id", kycId);
params.put("isQualified",isQualified); // 0不合格 1合格 params.put("isQualified",isQualified); // 0不合格 1合格
Response response = network.postResponse(params,BasicConfig.WORK_scheme_qualified); Response response = network.postResponse(params,BasicConfig.WORK_scheme_qualified);
if(result) {
boolean data = response.jsonPath().getBoolean("data"); boolean data = response.jsonPath().getBoolean("data");
Assert.assertEquals(data,result,network.message(params,BasicConfig.WORK_scheme_qualified,"标记KYC结果非"+result,response.body().asString())); Assert.assertEquals(data, result, network.message(params, BasicConfig.WORK_scheme_qualified, "标记KYC结果非" + result, response.body().asString()));
}else{
boolean success = response.jsonPath().getBoolean("success");
Assert.assertEquals(success, result, network.message(params, BasicConfig.WORK_scheme_qualified, "标记KYC结果非" + result, response.body().asString()));
}
} }
public static void getSchemeNum(int kycNum,int schemeNum,int commitPlanNum,Object hasQualifiedKyc){ public static void getSchemeNum(int kycNum,int schemeNum,int commitPlanNum,Object hasQualifiedKyc){
......
...@@ -721,7 +721,7 @@ public class Phone implements Authorization { ...@@ -721,7 +721,7 @@ public class Phone implements Authorization {
@Test(description = "方案讲解历史更新",priority = 67) @Test(description = "方案讲解历史更新",priority = 67)
public void 方案讲解历史更新(){ public void 方案讲解历史更新(){
getSchemeNum(3,2,2,true); getSchemeNum(3,2,2,false);
getSchemeList(3,2,0); getSchemeList(3,2,0);
} }
......
...@@ -444,14 +444,15 @@ public class Work implements Authorization { ...@@ -444,14 +444,15 @@ public class Work implements Authorization {
@Test(description = "修改客户个人信息",priority = 31) @Test(description = "修改客户个人信息",priority = 31)
public void 修改客户个人信息(){ public void 修改客户个人信息(){
HashMap<String,Object> params = new HashMap<>(); HashMap<String,Object> params = new HashMap<>();
long birthday = System.currentTimeMillis()-86400000; long now = System.currentTimeMillis();
long tomorrow = now-(now + 8*3600 * 1000) % (60*60*24*1000) + 86400000;
params.put("custId", cust_id); params.put("custId", cust_id);
params.put("birthdayTime", System.currentTimeMillis()-86400000); params.put("birthdayTime", tomorrow);
params.put("custAddress", "老的客户住址"); params.put("custAddress", "老的客户住址");
params.put("custGender", 1); params.put("custGender", 1);
Response response = network.postResponse(params,BasicConfig.WORK_updateInfo); Response response = network.postResponse(params,BasicConfig.WORK_updateInfo);
int size = response.jsonPath().getInt("data.liveDynamicListVoList.size()"); boolean data = response.jsonPath().getBoolean("data");
Assert.assertEquals(size,0,network.message(params,BasicConfig.WORK_updateInfo,"直播动态错误",response.body().asString())); Assert.assertTrue(data,network.message(params,BasicConfig.WORK_updateInfo,"修改个人信息失败",response.body().asString()));
params.clear(); params.clear();
params.put("custId", cust_id); params.put("custId", cust_id);
...@@ -461,7 +462,7 @@ public class Work implements Authorization { ...@@ -461,7 +462,7 @@ public class Work implements Authorization {
String custAddress= response.jsonPath().getString("data.custAddress"); String custAddress= response.jsonPath().getString("data.custAddress");
int age= response.jsonPath().getInt("data.age"); int age= response.jsonPath().getInt("data.age");
int custGender= response.jsonPath().getInt("data.custGender"); int custGender= response.jsonPath().getInt("data.custGender");
Assert.assertEquals(birthdayTime,birthday,network.message(params,BasicConfig.WORK_header,"出生年月日更新失败",response.body().asString())); Assert.assertEquals(birthdayTime,tomorrow,network.message(params,BasicConfig.WORK_header,"出生年月日更新失败",response.body().asString()));
Assert.assertEquals(age,0,network.message(params,BasicConfig.WORK_header,"年纪更新失败",response.body().asString())); Assert.assertEquals(age,0,network.message(params,BasicConfig.WORK_header,"年纪更新失败",response.body().asString()));
Assert.assertEquals(custAddress,"老的客户住址",network.message(params,BasicConfig.WORK_header,"家庭住址更新失败",response.body().asString())); Assert.assertEquals(custAddress,"老的客户住址",network.message(params,BasicConfig.WORK_header,"家庭住址更新失败",response.body().asString()));
Assert.assertEquals(custGender,1,network.message(params,BasicConfig.WORK_header,"性别更新失败",response.body().asString())); Assert.assertEquals(custGender,1,network.message(params,BasicConfig.WORK_header,"性别更新失败",response.body().asString()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment