Commit 2801f097 authored by 龚小红's avatar 龚小红

合并绑定关系

parent 42f1df2e
...@@ -145,7 +145,6 @@ public class LiveGuess implements Authorization { ...@@ -145,7 +145,6 @@ public class LiveGuess implements Authorization {
userDetailParam.put("confId",ConfId); userDetailParam.put("confId",ConfId);
Response response = network.postResponse(userDetailParam, BasicConfig.MOBILE_guess); Response response = network.postResponse(userDetailParam, BasicConfig.MOBILE_guess);
HashMap data =response.jsonPath().getJsonObject("data"); HashMap data =response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(userDetailParam, BasicConfig.MOBILE_guess, "访客H第1次参与猜数字红包失败", response.body().asString())); Assert.assertNotNull(data, network.message(userDetailParam, BasicConfig.MOBILE_guess, "访客H第1次参与猜数字红包失败", response.body().asString()));
this.guessMaxNum=(Integer) data.get("guessMaxNum"); this.guessMaxNum=(Integer) data.get("guessMaxNum");
this.guessMinNum = (Integer) data.get("guessMinNum"); this.guessMinNum = (Integer) data.get("guessMinNum");
......
...@@ -282,33 +282,6 @@ public class Lottery implements Authorization { ...@@ -282,33 +282,6 @@ public class Lottery implements Authorization {
this.shareSign = data; this.shareSign = data;
System.out.println(shareSign); System.out.println(shareSign);
Assert.assertNotNull(shareSign, network.message(signParam, BasicConfig.MOBILE_sign, "分享失败", signRes.body().asString())); Assert.assertNotNull(shareSign, network.message(signParam, BasicConfig.MOBILE_sign, "分享失败", signRes.body().asString()));
}
@Test(description = "邀请C关系绑定", priority = 20)
public void 邀请C关系绑定() {
visitorAuth3();
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
bindingParam.put("shareSign", shareSign);
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
System.out.println(success);
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "邀请C绑定结果和绑定凭证", priority = 22)
public void 邀请C绑定结果和绑定凭证() {
visitorAuth3();
ThreadSleepUtils.sleep(2000);
Map<String, Object> tokenParam = new HashMap<>();
tokenParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response tokenRes = network.getResponse(tokenParam, BasicConfig.MOBILE_Token);
Integer type = tokenRes.jsonPath().getInt("data.type");
System.out.println(type);
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
} }
...@@ -510,32 +483,6 @@ public class Lottery implements Authorization { ...@@ -510,32 +483,6 @@ public class Lottery implements Authorization {
} }
@Test(description = "幸运任务邀请D关系绑定", priority = 36)
public void 幸运任务邀请D关系绑定() {
visitorAuth4();
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
bindingParam.put("shareSign", shareSign);
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
System.out.println(success);
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "幸运任务邀请D绑定结果和绑定凭证", priority = 37)
public void 幸运任务邀请D绑定结果和绑定凭证() {
visitorAuth4();
ThreadSleepUtils.sleep(2000);
Map<String, Object> tokenParam = new HashMap<>();
tokenParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response tokenRes = network.getResponse(tokenParam, BasicConfig.MOBILE_Token);
Integer type = tokenRes.jsonPath().getInt("data.type");
System.out.println(type);
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "访客D给访客B助力", priority = 38) @Test(description = "访客D给访客B助力", priority = 38)
public void 访客D给访客B助力() { public void 访客D给访客B助力() {
visitorAuth4(); visitorAuth4();
...@@ -594,32 +541,6 @@ public class Lottery implements Authorization { ...@@ -594,32 +541,6 @@ public class Lottery implements Authorization {
Assert.assertNotNull(data, network.message(myCountParam, BasicConfig.USER_myCount, "获取抽奖码数量失败", myCountRes.body().asString())); Assert.assertNotNull(data, network.message(myCountParam, BasicConfig.USER_myCount, "获取抽奖码数量失败", myCountRes.body().asString()));
} }
@Test(description = "幸运任务邀请E关系绑定", priority = 42)
public void 幸运任务邀请E关系绑定() {
visitorAuth5();
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
bindingParam.put("shareSign", shareSign);
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
System.out.println(success);
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "幸运任务邀请E绑定结果和绑定凭证", priority = 43)
public void 幸运任务邀请E绑定结果和绑定凭证() {
visitorAuth5();
ThreadSleepUtils.sleep(2000);
Map<String, Object> tokenParam = new HashMap<>();
tokenParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response tokenRes = network.getResponse(tokenParam, BasicConfig.MOBILE_Token);
Integer type = tokenRes.jsonPath().getInt("data.type");
System.out.println(type);
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "访客E给访客B助力", priority = 44) @Test(description = "访客E给访客B助力", priority = 44)
public void 访客E给访客B助力() { public void 访客E给访客B助力() {
visitorAuth5(); visitorAuth5();
...@@ -670,31 +591,6 @@ public class Lottery implements Authorization { ...@@ -670,31 +591,6 @@ public class Lottery implements Authorization {
} }
@Test(description = "幸运任务邀请F关系绑定", priority = 48)
public void 幸运任务邀请F关系绑定() {
visitorAuth6();
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
bindingParam.put("shareSign", shareSign);
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
System.out.println(success);
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "幸运任务邀请F绑定结果和绑定凭证", priority = 49)
public void 幸运任务邀请F绑定结果和绑定凭证() {
visitorAuth6();
ThreadSleepUtils.sleep(2000);
Map<String, Object> tokenParam = new HashMap<>();
tokenParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response tokenRes = network.getResponse(tokenParam, BasicConfig.MOBILE_Token);
Integer type = tokenRes.jsonPath().getInt("data.type");
System.out.println(type);
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "访客F给访客B助力", priority = 50) @Test(description = "访客F给访客B助力", priority = 50)
public void 访客F给访客B助力() { public void 访客F给访客B助力() {
visitorAuth6(); visitorAuth6();
...@@ -753,32 +649,6 @@ public class Lottery implements Authorization { ...@@ -753,32 +649,6 @@ public class Lottery implements Authorization {
} }
@Test(description = "幸运任务邀请G关系绑定", priority = 54)
public void 幸运任务邀请G关系绑定() {
visitorAuth7();
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
bindingParam.put("shareSign", shareSign);
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
System.out.println(success);
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "幸运任务邀请G绑定结果和绑定凭证", priority = 55)
public void 幸运任务邀请G绑定结果和绑定凭证() {
visitorAuth7();
ThreadSleepUtils.sleep(2000);
Map<String, Object> tokenParam = new HashMap<>();
tokenParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response tokenRes = network.getResponse(tokenParam, BasicConfig.MOBILE_Token);
Integer type = tokenRes.jsonPath().getInt("data.type");
System.out.println(type);
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
}
@Test(description = "访客G给访客B助力", priority = 56) @Test(description = "访客G给访客B助力", priority = 56)
public void 访客G给访客B助力() { public void 访客G给访客B助力() {
visitorAuth7(); visitorAuth7();
......
...@@ -203,7 +203,7 @@ public class SecondKill implements Authorization { ...@@ -203,7 +203,7 @@ public class SecondKill implements Authorization {
@Test(description = "查看当前秒杀商品", priority = 11) @Test(description = "查看当前秒杀商品", priority = 11)
public void 查看当前秒杀商品() { public void 查看当前秒杀商品() {
visitorAuth(); visitorAuth();
sleep(3000); sleep(10000);
Map<String, Object> goodsFirstPar = new HashMap<>(); Map<String, Object> goodsFirstPar = new HashMap<>();
goodsFirstPar.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey())); goodsFirstPar.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response goodsFirstRes = network.getResponse(goodsFirstPar, BasicConfig.MOBILE_secondKill_goodsFirst); Response goodsFirstRes = network.getResponse(goodsFirstPar, BasicConfig.MOBILE_secondKill_goodsFirst);
......
...@@ -852,31 +852,6 @@ public class Treasure implements Authorization { ...@@ -852,31 +852,6 @@ public class Treasure implements Authorization {
this.shareSign = data; this.shareSign = data;
System.out.println(shareSign); System.out.println(shareSign);
Assert.assertNotNull(shareSign, network.message(signParam, BasicConfig.MOBILE_sign, "分享失败", signRes.body().asString())); Assert.assertNotNull(shareSign, network.message(signParam, BasicConfig.MOBILE_sign, "分享失败", signRes.body().asString()));
}
@Test(description = "访客N与访客O邀请关系绑定", priority = 69)
public void 访客N与访客O邀请关系绑定() {
visitorAuth15();
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
bindingParam.put("shareSign",shareSign);
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
System.out.println(success);
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
@Test(description = "访客O获取绑定结果和绑定凭证", priority = 70)
public void 访客O获取绑定结果和绑定凭证() {
visitorAuth15();
ThreadSleepUtils.sleep(2000);
Map<String, Object> tokenParam = new HashMap<>();
tokenParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response tokenRes = network.getResponse(tokenParam, BasicConfig.MOBILE_Token);
Integer type = tokenRes.jsonPath().getInt("data.type");
System.out.println(type);
Assert.assertTrue(type==3, network.message(tokenParam, BasicConfig.MOBILE_Token, "未获取到绑定结果", tokenRes.body().asString()));
} }
@Test(description = "访客O给访客N助力", priority = 71) @Test(description = "访客O给访客N助力", priority = 71)
...@@ -991,18 +966,4 @@ public class Treasure implements Authorization { ...@@ -991,18 +966,4 @@ public class Treasure implements Authorization {
Assert.assertTrue(dataList.size()==6, network.message(openParam, BasicConfig.MANAGER_participateList, "查询领取列表失败", response.body().asString())); Assert.assertTrue(dataList.size()==6, network.message(openParam, BasicConfig.MANAGER_participateList, "查询领取列表失败", response.body().asString()));
} }
/**
* 添加代理人绑定关系
*/
@Test(description = "代理人绑定", priority = 77)
public void 代理人绑定() {
agentAuth();
Map<String, Object> bindingParam = new HashMap<>();
bindingParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response bindingRes = network.postResponse(bindingParam, BasicConfig.MOBILE_binding);
boolean success = bindingRes.jsonPath().getJsonObject("success");
System.out.println(success);
Assert.assertTrue(success, network.message(bindingParam, BasicConfig.MOBILE_binding, "绑定失败", bindingRes.body().asString()));
}
} }
...@@ -24,17 +24,23 @@ ...@@ -24,17 +24,23 @@
<!-- </classes>--> <!-- </classes>-->
<!-- </test>--> <!-- </test>-->
<!-- <test preserve-order="true" name="创建直播">--> <test preserve-order="true" name="创建直播">
<!-- <classes>--> <classes>
<!-- <class name="com.kjj.cases.live.liveConfig.SaveLive"/>--> <class name="com.kjj.cases.live.liveConfig.SaveLive"/>
<!-- </classes>--> </classes>
<!-- </test>--> </test>
<!-- <test preserve-order="true" name="配置秒杀轮次及秒杀预告">--> <test preserve-order="true" name="配置秒杀轮次及秒杀预告">
<!-- <classes>--> <classes>
<!-- <class name="com.kjj.cases.live.secondKill.ConfSecondKill"/>--> <class name="com.kjj.cases.live.secondKill.ConfSecondKill"/>
<!-- </classes>--> </classes>
<!-- </test>--> </test>
<test preserve-order="true" name="绑定关系绑定">
<classes>
<class name="com.kjj.cases.live.liveConfig.LiveBinding"/>
</classes>
</test>
<!-- <test preserve-order="true" name="配置代理人邀约奖励">--> <!-- <test preserve-order="true" name="配置代理人邀约奖励">-->
<!-- <classes>--> <!-- <classes>-->
<!-- <class name="com.kjj.cases.live.inviteReward.ManagerRewardConf"/>--> <!-- <class name="com.kjj.cases.live.inviteReward.ManagerRewardConf"/>-->
...@@ -115,11 +121,11 @@ ...@@ -115,11 +121,11 @@
<!-- </classes>--> <!-- </classes>-->
<!-- </test>--> <!-- </test>-->
<!-- <test preserve-order="true" name="助播-开启直播">--> <test preserve-order="true" name="助播-开启直播">
<!-- <classes>--> <classes>
<!-- <class name="com.kjj.cases.live.anchor.OpenLive"/>--> <class name="com.kjj.cases.live.anchor.OpenLive"/>
<!-- </classes>--> </classes>
<!-- </test>--> </test>
<!-- <test preserve-order="true" name="评论及回复">--> <!-- <test preserve-order="true" name="评论及回复">-->
<!-- <classes>--> <!-- <classes>-->
...@@ -143,17 +149,17 @@ ...@@ -143,17 +149,17 @@
<!-- <class name="com.kjj.cases.live.lottery.Lottery"/>--> <!-- <class name="com.kjj.cases.live.lottery.Lottery"/>-->
<!-- </classes>--> <!-- </classes>-->
<!-- </test>--> <!-- </test>-->
<!-- <test preserve-order="true" name="秒杀互动">--> <test preserve-order="true" name="秒杀互动">
<!-- <classes>--> <classes>
<!-- <class name="com.kjj.cases.live.secondKill.SecondKill"/>--> <class name="com.kjj.cases.live.secondKill.SecondKill"/>
<!-- </classes>--> </classes>
<!-- </test>--> </test>
<!-- <test preserve-order="true" name="猜数字红包">--> <test preserve-order="true" name="猜数字红包">
<!-- <classes>--> <classes>
<!-- <class name="com.kjj.cases.live.guess.LiveGuess"/>--> <class name="com.kjj.cases.live.guess.LiveGuess"/>
<!-- </classes>--> </classes>
<!-- </test>--> </test>
<!-- <test preserve-order="true" name="看直播攒现金">--> <!-- <test preserve-order="true" name="看直播攒现金">-->
<!-- <classes>--> <!-- <classes>-->
...@@ -184,11 +190,11 @@ ...@@ -184,11 +190,11 @@
<!-- </classes>--> <!-- </classes>-->
<!-- </test>--> <!-- </test>-->
<!-- <test preserve-order="true" name="有奖答题">--> <test preserve-order="true" name="有奖答题">
<!-- <classes>--> <classes>
<!-- <class name="com.kjj.cases.live.answer.Answer"/>--> <class name="com.kjj.cases.live.answer.Answer"/>
<!-- </classes>--> </classes>
<!-- </test>--> </test>
<!-- <test preserve-order="true" name="投票">--> <!-- <test preserve-order="true" name="投票">-->
<!-- <classes>--> <!-- <classes>-->
...@@ -261,11 +267,11 @@ ...@@ -261,11 +267,11 @@
<!-- <class name="com.kjj.cases.live.customer.PersonalPage" />--> <!-- <class name="com.kjj.cases.live.customer.PersonalPage" />-->
<!-- </classes>--> <!-- </classes>-->
<!-- </test>--> <!-- </test>-->
<test preserve-order="true" name="创建简易直播"> <!-- <test preserve-order="true" name="创建简易直播">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.liveConfig.SimpleLiveConfig" /> <!-- <class name="com.kjj.cases.live.liveConfig.SimpleLiveConfig" />-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="砸金蛋"> <test preserve-order="true" name="砸金蛋">
<classes> <classes>
<class name="com.kjj.cases.live.treasure.GoldenEgg" /> <class name="com.kjj.cases.live.treasure.GoldenEgg" />
......
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