Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oto
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
龚小红
oto
Commits
b9de1b1c
Commit
b9de1b1c
authored
May 12, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增团队分配奖品
parent
a1c88391
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
Lottery.java
src/test/java/com/kjj/cases/live/lottery/Lottery.java
+10
-2
TeamLottery.java
src/test/java/com/kjj/cases/live/manager/TeamLottery.java
+4
-2
No files found.
src/test/java/com/kjj/cases/live/lottery/Lottery.java
View file @
b9de1b1c
...
@@ -1238,11 +1238,15 @@ public class Lottery implements AdminAuthorization {
...
@@ -1238,11 +1238,15 @@ public class Lottery implements AdminAuthorization {
Response
hasEndResA
=
network
.
getResponse
(
hasEndParam
,
BasicConfig
.
USER_result
);
Response
hasEndResA
=
network
.
getResponse
(
hasEndParam
,
BasicConfig
.
USER_result
);
boolean
dataA
=
getData
(
hasEndResA
);
boolean
dataA
=
getData
(
hasEndResA
);
visitorAuth
();
Response
hasEndResC
=
network
.
getResponse
(
hasEndParam
,
BasicConfig
.
USER_result
);
boolean
dataC
=
getData
(
hasEndResC
);
visitorAuth10
();
visitorAuth10
();
Response
hasEndResB
=
network
.
getResponse
(
hasEndParam
,
BasicConfig
.
USER_result
);
Response
hasEndResB
=
network
.
getResponse
(
hasEndParam
,
BasicConfig
.
USER_result
);
boolean
dataB
=
getData
(
hasEndResB
);
boolean
dataB
=
getData
(
hasEndResB
);
String
responseBody
=
"A="
+
hasEndResA
.
body
().
asString
()
+
", B="
+
hasEndResB
.
body
().
asString
();
String
responseBody
=
"A="
+
hasEndResA
.
body
().
asString
()
+
", B="
+
hasEndResB
.
body
().
asString
();
Assert
.
assertTrue
(
dataA
||
dataB
,
network
.
message
(
hasEndParam
,
BasicConfig
.
USER_result
,
"指定访客未中奖"
,
responseBody
));
Assert
.
assertTrue
(
dataA
||
dataB
||
dataC
,
network
.
message
(
hasEndParam
,
BasicConfig
.
USER_result
,
"指定访客未中奖"
,
responseBody
));
}
}
private
boolean
getData
(
Response
hasEndRes
)
{
private
boolean
getData
(
Response
hasEndRes
)
{
...
@@ -1360,11 +1364,15 @@ public class Lottery implements AdminAuthorization {
...
@@ -1360,11 +1364,15 @@ public class Lottery implements AdminAuthorization {
Response
hasEndResA
=
network
.
getResponse
(
hasEndParam
,
BasicConfig
.
USER_result
);
Response
hasEndResA
=
network
.
getResponse
(
hasEndParam
,
BasicConfig
.
USER_result
);
boolean
dataA
=
getDataLottery
(
hasEndResA
);
boolean
dataA
=
getDataLottery
(
hasEndResA
);
visitorAuth
();
Response
hasEndResC
=
network
.
getResponse
(
hasEndParam
,
BasicConfig
.
USER_result
);
boolean
dataC
=
getData
(
hasEndResC
);
visitorAuth10
();
visitorAuth10
();
Response
hasEndResB
=
network
.
getResponse
(
hasEndParam
,
BasicConfig
.
USER_result
);
Response
hasEndResB
=
network
.
getResponse
(
hasEndParam
,
BasicConfig
.
USER_result
);
boolean
dataB
=
getDataLottery
(
hasEndResB
);
boolean
dataB
=
getDataLottery
(
hasEndResB
);
String
responseBody
=
"A="
+
hasEndResA
.
body
().
asString
()
+
", B="
+
hasEndResB
.
body
().
asString
();
String
responseBody
=
"A="
+
hasEndResA
.
body
().
asString
()
+
", B="
+
hasEndResB
.
body
().
asString
();
Assert
.
assertTrue
(
dataA
||
dataB
,
network
.
message
(
hasEndParam
,
BasicConfig
.
USER_result
,
"访客未中奖"
,
responseBody
));
Assert
.
assertTrue
(
dataA
||
dataB
||
dataC
,
network
.
message
(
hasEndParam
,
BasicConfig
.
USER_result
,
"访客未中奖"
,
responseBody
));
}
}
...
...
src/test/java/com/kjj/cases/live/manager/TeamLottery.java
View file @
b9de1b1c
package
com
.
kjj
.
cases
.
live
.
manager
;
package
com
.
kjj
.
cases
.
live
.
manager
;
import
com.alibaba.fastjson.JSON
;
import
com.kjj.bean.manager.TeamList
;
import
com.kjj.bean.manager.TeamList
;
import
com.kjj.bean.manager.TreasureList
;
import
com.kjj.bean.manager.TreasureList
;
import
com.kjj.cases.live.admin.AdminAuthorization
;
import
com.kjj.cases.live.admin.AdminAuthorization
;
...
@@ -59,8 +60,9 @@ public class TeamLottery implements AdminAuthorization {
...
@@ -59,8 +60,9 @@ public class TeamLottery implements AdminAuthorization {
saveParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
saveParam
.
put
(
"liveId"
,
LiveConstants
.
getValue
(
LiveConstants
.
StringKeyEnum
.
LIVE_ID
.
getKey
()));
saveParam
.
put
(
"confId"
,
confId
);
saveParam
.
put
(
"confId"
,
confId
);
saveParam
.
put
(
"teamId"
,
3817
);
saveParam
.
put
(
"teamId"
,
3817
);
saveParam
.
put
(
"totalNum"
,
1
00
);
saveParam
.
put
(
"totalNum"
,
1
);
Response
response
=
network
.
postResponse
(
saveParam
,
BasicConfig
.
MANAGER_saveteam
);
Response
response
=
network
.
postResponse
(
saveParam
,
BasicConfig
.
MANAGER_saveteam
);
System
.
out
.
println
(
response
.
jsonPath
());
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
saveParam
,
BasicConfig
.
MANAGER_saveteam
,
"新增团队失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
saveParam
,
BasicConfig
.
MANAGER_saveteam
,
"新增团队失败"
,
response
.
body
().
asString
()));
...
@@ -87,7 +89,7 @@ public class TeamLottery implements AdminAuthorization {
...
@@ -87,7 +89,7 @@ public class TeamLottery implements AdminAuthorization {
public
void
修改团队份数
()
{
public
void
修改团队份数
()
{
Map
<
String
,
Object
>
changeNumParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
changeNumParam
=
new
HashMap
<>();
changeNumParam
.
put
(
"id"
,
Id
);
changeNumParam
.
put
(
"id"
,
Id
);
changeNumParam
.
put
(
"totalNum"
,
99
);
changeNumParam
.
put
(
"totalNum"
,
2
);
Response
response
=
network
.
postResponse
(
changeNumParam
,
BasicConfig
.
MANAGER_changeNum
);
Response
response
=
network
.
postResponse
(
changeNumParam
,
BasicConfig
.
MANAGER_changeNum
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
System
.
out
.
println
(
data
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment