Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
test-platform
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
马博
test-platform
Commits
ef3b1c01
Commit
ef3b1c01
authored
Dec 18, 2018
by
赵然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zr
parent
e2a1ae7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
0 deletions
+61
-0
瓜分积分_实际瓜分_主胜方_AccessTest.java
...ava/http/cases/PkMoudleTest/瓜分积分_实际瓜分_主胜方_AccessTest.java
+61
-0
No files found.
src/test/java/http/cases/PkMoudleTest/瓜分积分_实际瓜分_主胜方_AccessTest.java
View file @
ef3b1c01
...
...
@@ -20,8 +20,10 @@ import org.joda.time.format.DateTimeFormat;
import
org.joda.time.format.DateTimeFormatter
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.testng.Assert
;
import
org.testng.annotations.AfterClass
;
import
org.testng.annotations.Test
;
import
java.sql.SQLException
;
import
java.util.Map
;
...
...
@@ -199,6 +201,65 @@ public class 瓜分积分_实际瓜分_主胜方_AccessTest extends DuibaTestBas
Assert
.
assertEquals
(
response2
.
jsonPath
().
getString
(
"data.show"
),
"false"
,
"展示弹窗校验失败"
);
}
@Test
(
dependsOnMethods
=
{
"出奖弹层校验"
})
public
void
战绩页校验
()
throws
Exception
{
Response
response
=
pkService
.
list
(
uid3
);
response
.
prettyPrint
();
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].userWin"
),
"true"
,
"中奖记录校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].betConfig.id"
),
betId
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].betConfig.shareExp"
),
"30"
,
"活动瓜分金额校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].betConfig.configStatus"
),
"4"
,
"活动状态校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].betConfig.creditsValue"
),
"1.00"
,
"活动消耗校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].betConfig.betType"
),
"1"
,
"活动押注类型校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].betConfig.bonusType"
),
"4"
,
"活动瓜分类型校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[0].betId"
),
betId
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[0].resultStatus"
),
"4"
,
"活动选项结果状态校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[0].optionId"
),
optionId1
,
"活动投注id1校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[0].rank"
),
"2"
,
"活动投注结果校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[0].betTimes"
),
"3"
,
"活动投注人数校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[0].scale"
),
"37.5"
,
"活动投注人数比例校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[1].betId"
),
betId
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[1].resultStatus"
),
"4"
,
"活动选项结果状态校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[1].optionId"
),
optionId2
,
"活动投注id1校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[1].rank"
),
"1"
,
"活动投注结果校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[1].betTimes"
),
"5"
,
"活动投注人数校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[1].scale"
),
"62.5"
,
"活动投注人数比例校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.betId"
),
betId
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.optionId"
),
optionId2
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.bonus"
),
"0.06"
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.exchangeStatus"
),
"1"
,
"兑换状态校验失败"
);
response
=
pkService
.
list
(
uid1
);
response
.
prettyPrint
();
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].userWin"
),
"false"
,
"中奖记录校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.betId"
),
betId
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.optionId"
),
optionId1
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.bonus"
),
"0.0"
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.exchangeStatus"
),
"0"
,
"兑换状态校验失败"
);
}
@AfterClass
public
void
afterclass
()
{
try
{
Boolean
result1
=
jdbc
.
update
(
"delete from act_com_conf.tb_bet_option where bet_id = ?"
,
betId
);
Boolean
result4
=
jdbc
.
update
(
"delete from act_record.tb_bet_record where bet_id = ?"
,
betId
);
Boolean
result5
=
jdbc
.
update
(
"delete from bet_activity.tb_bet_result where bet_id = ?"
,
betId
);
Boolean
result2
=
jdbc
.
update
(
"delete from act_com_conf.tb_bet_group_relation where bet_id = ?"
,
betId
);
Boolean
result3
=
jdbc
.
update
(
"delete from act_com_conf.tb_bet_config where id = ?"
,
betId
);
}
catch
(
SQLException
e
)
{
e
.
printStackTrace
();
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
}
public
void
modifyOpenPrizeTime
(
String
betId
,
int
x
)
throws
Exception
{
DateTime
time1
=
new
DateTime
();
...
...
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