Commit eb80c1d7 authored by xiamengchen's avatar xiamengchen

解决tku失效报错问题

parent 2e62f6b8
......@@ -71,7 +71,7 @@ public class SignRed implements Authorization {
Assert.assertTrue(attendAmount > 0, network.message(ATTEND_open, "签到失败", response.body().asString()));
}else{
boolean success = response.jsonPath().getBoolean("success");
Assert.assertTrue(success, network.message(ATTEND_open, "重复签到成功", response.body().asString()));
Assert.assertFalse(success, network.message(ATTEND_open, "重复签到成功", response.body().asString()));
}
}
......@@ -86,20 +86,23 @@ public class SignRed implements Authorization {
@Test(description = "代理人账户明细",priority = 7)
public void 代理人账户明细() {
agentTku();
Map<String, Object> Params = new HashMap<String, Object>();
Params.put("type", 2);
Params.put("pageNo", 1);
Params.put("pageSize", 20);
Response response = network.getResponse(Params, PAY_accDetail);
System.out.println(response.body().asString());
int changeType1 = response.jsonPath().getInt("data[0].changeType");
String nickname = response.jsonPath().getString("data[0].nickname");
int bizType = response.jsonPath().getInt("data[0].bizType");
String changeMoney = response.jsonPath().getString("data[0].changeMoney");
Assert.assertEquals(changeType1 ,2, network.message(PAY_accDetail, "收益明细类型错误", response.body().asString()));
Assert.assertEquals(nickname, "吉吉",network.message(PAY_accDetail, "签到用户名称错误", response.body().asString()));
Assert.assertEquals(bizType, 16,network.message(PAY_accDetail, "收益明细类型错误", response.body().asString()));
Assert.assertEquals(changeMoney, String.format("%.2f",attendAmount/100),network.message(PAY_accDetail, "收益金额错误", response.body().asString()));
if (!todayAttendFlag) {
agentTku();
Map<String, Object> Params = new HashMap<String, Object>();
Params.put("type", 2);
Params.put("pageNo", 1);
Params.put("pageSize", 20);
Response response = network.getResponse(Params, PAY_accDetail);
System.out.println(response.body().asString());
int changeType1 = response.jsonPath().getInt("data[0].changeType");
String nickname = response.jsonPath().getString("data[0].nickname");
int bizType = response.jsonPath().getInt("data[0].bizType");
String changeMoney = response.jsonPath().getString("data[0].changeMoney");
Assert.assertEquals(changeType1 ,2, network.message(PAY_accDetail, "收益明细类型错误", response.body().asString()));
Assert.assertEquals(nickname, "吉吉",network.message(PAY_accDetail, "签到用户名称错误", response.body().asString()));
Assert.assertEquals(bizType, 16,network.message(PAY_accDetail, "收益明细类型错误", response.body().asString()));
Assert.assertEquals(changeMoney, String.format("%.2f",attendAmount/100),network.message(PAY_accDetail, "收益金额错误", 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