Commit 4d2d9dc5 authored by 龚小红's avatar 龚小红

修改时长宝箱的校验条件

parent d1687df5
...@@ -104,11 +104,9 @@ public class TreasureTime implements Authorization { ...@@ -104,11 +104,9 @@ public class TreasureTime implements Authorization {
params.put("treasureConfId",this.treasureConfId.get(0).getTreasureConfId()); params.put("treasureConfId",this.treasureConfId.get(0).getTreasureConfId());
Response response = network.getResponse(params, BasicConfig.MOBILE_joinResult); Response response = network.getResponse(params, BasicConfig.MOBILE_joinResult);
Integer treasureType=response.jsonPath().getInt("data.treasureType"); Integer treasureType=response.jsonPath().getInt("data.treasureType");
System.out.println(treasureType);
Assert.assertTrue(treasureType==1, network.message(params, BasicConfig.MOBILE_joinResult, "中奖结果非抽奖码类型", response.body().asString())); Assert.assertTrue(treasureType==1, network.message(params, BasicConfig.MOBILE_joinResult, "中奖结果非抽奖码类型", response.body().asString()));
Integer receiveStatus=response.jsonPath().getInt("data.receiveStatus"); Integer receiveStatus=response.jsonPath().getInt("data.receiveStatus");
System.out.println(receiveStatus);
Assert.assertTrue(receiveStatus==2, network.message(params, BasicConfig.MOBILE_joinResult, "领取失败", response.body().asString())); Assert.assertTrue(receiveStatus==2, network.message(params, BasicConfig.MOBILE_joinResult, "领取失败", response.body().asString()));
} }
...@@ -127,14 +125,12 @@ public class TreasureTime implements Authorization { ...@@ -127,14 +125,12 @@ public class TreasureTime implements Authorization {
ThreadSleepUtils.sleep(1000); ThreadSleepUtils.sleep(1000);
Response response = network.postResponse(params, BasicConfig.MOBILE_finish); Response response = network.postResponse(params, BasicConfig.MOBILE_finish);
boolean data=response.jsonPath().getBoolean("data"); boolean data=response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_finish, "访客H获取宝箱参与情况失败", response.body().asString())); Assert.assertTrue(data, network.message(params, BasicConfig.MOBILE_finish, "访客H获取宝箱参与情况失败", response.body().asString()));
visitorAuth9(); visitorAuth9();
ThreadSleepUtils.sleep(1000); ThreadSleepUtils.sleep(1000);
Response response1 = network.postResponse(params, BasicConfig.MOBILE_finish); Response response1 = network.postResponse(params, BasicConfig.MOBILE_finish);
boolean data1=response.jsonPath().getBoolean("data"); boolean data1=response.jsonPath().getBoolean("data");
System.out.println(data1);
Assert.assertTrue(data1, network.message(params, BasicConfig.MOBILE_finish, "访客H获取宝箱参与情况失败", response1.body().asString())); Assert.assertTrue(data1, network.message(params, BasicConfig.MOBILE_finish, "访客H获取宝箱参与情况失败", response1.body().asString()));
//红包发完降级抽奖码 //红包发完降级抽奖码
...@@ -142,7 +138,6 @@ public class TreasureTime implements Authorization { ...@@ -142,7 +138,6 @@ public class TreasureTime implements Authorization {
ThreadSleepUtils.sleep(1000); ThreadSleepUtils.sleep(1000);
Response response2 = network.postResponse(params, BasicConfig.MOBILE_finish); Response response2 = network.postResponse(params, BasicConfig.MOBILE_finish);
boolean data2=response.jsonPath().getBoolean("data"); boolean data2=response.jsonPath().getBoolean("data");
System.out.println(data2);
Assert.assertTrue(data2, network.message(params, BasicConfig.MOBILE_finish, "访客H获取宝箱参与情况失败", response2.body().asString())); Assert.assertTrue(data2, network.message(params, BasicConfig.MOBILE_finish, "访客H获取宝箱参与情况失败", response2.body().asString()));
} }
...@@ -159,7 +154,6 @@ public class TreasureTime implements Authorization { ...@@ -159,7 +154,6 @@ public class TreasureTime implements Authorization {
Response response = network.getResponse(params, BasicConfig.MOBILE_joinDetail1); Response response = network.getResponse(params, BasicConfig.MOBILE_joinDetail1);
List<CondDetail> treasureList = JsonUtil.parseResponseToListBean(response, CondDetail.class,"condDetail"); List<CondDetail> treasureList = JsonUtil.parseResponseToListBean(response, CondDetail.class,"condDetail");
boolean finishFlag=treasureList.get(1).isFinishFlag(); boolean finishFlag=treasureList.get(1).isFinishFlag();
System.out.println(finishFlag);
Assert.assertTrue(finishFlag, network.message(params, BasicConfig.MOBILE_joinDetail1, "访客H获取第2个宝箱参与情况失败", response.body().asString())); Assert.assertTrue(finishFlag, network.message(params, BasicConfig.MOBILE_joinDetail1, "访客H获取第2个宝箱参与情况失败", response.body().asString()));
visitorAuth9(); visitorAuth9();
...@@ -167,7 +161,6 @@ public class TreasureTime implements Authorization { ...@@ -167,7 +161,6 @@ public class TreasureTime implements Authorization {
Response response1 = network.getResponse(params, BasicConfig.MOBILE_joinDetail1); Response response1 = network.getResponse(params, BasicConfig.MOBILE_joinDetail1);
List<CondDetail> treasureList1 = JsonUtil.parseResponseToListBean(response1, CondDetail.class,"condDetail"); List<CondDetail> treasureList1 = JsonUtil.parseResponseToListBean(response1, CondDetail.class,"condDetail");
boolean finishFlag1=treasureList1.get(1).isFinishFlag(); boolean finishFlag1=treasureList1.get(1).isFinishFlag();
System.out.println(finishFlag1);
Assert.assertTrue(finishFlag1, network.message(params, BasicConfig.MOBILE_joinDetail1, "访客H获取第2个宝箱参与情况失败", response.body().asString())); Assert.assertTrue(finishFlag1, network.message(params, BasicConfig.MOBILE_joinDetail1, "访客H获取第2个宝箱参与情况失败", response.body().asString()));
//红包发完降级抽奖码 //红包发完降级抽奖码
...@@ -176,7 +169,6 @@ public class TreasureTime implements Authorization { ...@@ -176,7 +169,6 @@ public class TreasureTime implements Authorization {
Response response2 = network.getResponse(params, BasicConfig.MOBILE_joinDetail1); Response response2 = network.getResponse(params, BasicConfig.MOBILE_joinDetail1);
List<CondDetail> treasureList2 = JsonUtil.parseResponseToListBean(response2, CondDetail.class,"condDetail"); List<CondDetail> treasureList2 = JsonUtil.parseResponseToListBean(response2, CondDetail.class,"condDetail");
boolean finishFlag2=treasureList2.get(1).isFinishFlag(); boolean finishFlag2=treasureList2.get(1).isFinishFlag();
System.out.println(finishFlag2);
Assert.assertTrue(finishFlag2, network.message(params, BasicConfig.MOBILE_joinDetail1, "访客H获取第2个宝箱参与情况失败", response.body().asString())); Assert.assertTrue(finishFlag2, network.message(params, BasicConfig.MOBILE_joinDetail1, "访客H获取第2个宝箱参与情况失败", response.body().asString()));
...@@ -224,25 +216,27 @@ public class TreasureTime implements Authorization { ...@@ -224,25 +216,27 @@ public class TreasureTime implements Authorization {
visitorAuth7(); visitorAuth7();
ThreadSleepUtils.sleep(1000); ThreadSleepUtils.sleep(1000);
Response response = network.getResponse(params, BasicConfig.MOBILE_joinResult); Response response = network.getResponse(params, BasicConfig.MOBILE_joinResult);
Integer treasureType=response.jsonPath().getInt("data.treasureType");
Object data=response.jsonPath().getJsonObject("data"); Assert.assertTrue(treasureType==1, network.message(params, BasicConfig.MOBILE_joinResult, "中奖结果非抽奖码类型", response.body().asString()));
System.out.println(data); Integer receiveStatus=response.jsonPath().getInt("data.receiveStatus");
Assert.assertNotNull(data, network.message(params, BasicConfig.MOBILE_joinResult, "访客H获取宝箱参与情况失败", response.body().asString())); Assert.assertTrue(receiveStatus==2, network.message(params, BasicConfig.MOBILE_joinResult, "领取失败", response.body().asString()));
visitorAuth9(); visitorAuth9();
ThreadSleepUtils.sleep(1000); ThreadSleepUtils.sleep(1000);
Response response1 = network.getResponse(params, BasicConfig.MOBILE_joinResult); response = network.getResponse(params, BasicConfig.MOBILE_joinResult);
Object data1=response1.jsonPath().getJsonObject("data"); treasureType=response.jsonPath().getInt("data.treasureType");
System.out.println(data); Assert.assertTrue(treasureType==2, network.message(params, BasicConfig.MOBILE_joinResult, "中奖结果非抽奖码类型", response.body().asString()));
Assert.assertNotNull(data1, network.message(params, BasicConfig.MOBILE_joinResult, "访客H获取宝箱参与情况失败", response1.body().asString())); receiveStatus=response.jsonPath().getInt("data.receiveStatus");
Assert.assertTrue(receiveStatus==2, network.message(params, BasicConfig.MOBILE_joinResult, "领取失败", response.body().asString()));
//红包发完降级抽奖码 //红包发完降级抽奖码
visitorAuth13(); visitorAuth13();
ThreadSleepUtils.sleep(1000); ThreadSleepUtils.sleep(1000);
Response response2 = network.getResponse(params, BasicConfig.MOBILE_joinResult); response = network.getResponse(params, BasicConfig.MOBILE_joinResult);
Object data2=response2.jsonPath().getJsonObject("data"); treasureType=response.jsonPath().getInt("data.treasureType");
System.out.println(data); Assert.assertTrue(treasureType==1, network.message(params, BasicConfig.MOBILE_joinResult, "中奖结果非抽奖码类型", response.body().asString()));
Assert.assertNotNull(data2, network.message(params, BasicConfig.MOBILE_joinResult, "访客H获取宝箱参与情况失败", response2.body().asString())); receiveStatus=response.jsonPath().getInt("data.receiveStatus");
Assert.assertTrue(receiveStatus==2, network.message(params, BasicConfig.MOBILE_joinResult, "领取失败", response.body().asString()));
} }
...@@ -358,24 +352,27 @@ public class TreasureTime implements Authorization { ...@@ -358,24 +352,27 @@ public class TreasureTime implements Authorization {
visitorAuth7(); visitorAuth7();
ThreadSleepUtils.sleep(1000); ThreadSleepUtils.sleep(1000);
Response response = network.getResponse(params, BasicConfig.MOBILE_joinResult); Response response = network.getResponse(params, BasicConfig.MOBILE_joinResult);
Object data=response.jsonPath().getJsonObject("data"); Integer treasureType=response.jsonPath().getInt("data.treasureType");
System.out.println(data); Assert.assertTrue(treasureType==1, network.message(params, BasicConfig.MOBILE_joinResult, "中奖结果非抽奖码类型", response.body().asString()));
Assert.assertNotNull(data, network.message(params, BasicConfig.MOBILE_joinResult, "访客H获取宝箱参与情况失败", response.body().asString())); Integer receiveStatus=response.jsonPath().getInt("data.receiveStatus");
Assert.assertTrue(receiveStatus==2, network.message(params, BasicConfig.MOBILE_joinResult, "领取失败", response.body().asString()));
visitorAuth9(); visitorAuth9();
ThreadSleepUtils.sleep(1000); ThreadSleepUtils.sleep(1000);
Response response1 = network.getResponse(params, BasicConfig.MOBILE_joinResult); response = network.getResponse(params, BasicConfig.MOBILE_joinResult);
Object data1=response1.jsonPath().getJsonObject("data"); treasureType=response.jsonPath().getInt("data.treasureType");
System.out.println(data); Assert.assertTrue(treasureType==3, network.message(params, BasicConfig.MOBILE_joinResult, "中奖结果非抽奖码类型", response.body().asString()));
Assert.assertNotNull(data1, network.message(params, BasicConfig.MOBILE_joinResult, "访客H获取宝箱参与情况失败", response1.body().asString())); receiveStatus=response.jsonPath().getInt("data.receiveStatus");
Assert.assertTrue(receiveStatus==2, network.message(params, BasicConfig.MOBILE_joinResult, "领取失败", response.body().asString()));
//红包发完降级抽奖码 //红包发完降级抽奖码
visitorAuth13(); visitorAuth13();
ThreadSleepUtils.sleep(1000); ThreadSleepUtils.sleep(1000);
Response response2 = network.getResponse(params, BasicConfig.MOBILE_joinResult); response = network.getResponse(params, BasicConfig.MOBILE_joinResult);
Object data2=response2.jsonPath().getJsonObject("data"); treasureType=response.jsonPath().getInt("data.treasureType");
System.out.println(data); Assert.assertTrue(treasureType==1, network.message(params, BasicConfig.MOBILE_joinResult, "中奖结果非抽奖码类型", response.body().asString()));
Assert.assertNotNull(data2, network.message(params, BasicConfig.MOBILE_joinResult, "访客H获取宝箱参与情况失败", response2.body().asString())); receiveStatus=response.jsonPath().getInt("data.receiveStatus");
Assert.assertTrue(receiveStatus==2, network.message(params, BasicConfig.MOBILE_joinResult, "领取失败", response.body().asString()));
} }
...@@ -441,13 +438,5 @@ public class TreasureTime implements Authorization { ...@@ -441,13 +438,5 @@ public class TreasureTime implements Authorization {
int receiveStatus=response.jsonPath().getInt("data.receiveStatus"); int receiveStatus=response.jsonPath().getInt("data.receiveStatus");
System.out.println(receiveStatus); System.out.println(receiveStatus);
Assert.assertTrue(receiveStatus==2,network.message(params, BasicConfig.MOBILE_joinResult, "领取失败", response.body().asString())); Assert.assertTrue(receiveStatus==2,network.message(params, BasicConfig.MOBILE_joinResult, "领取失败", 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