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
0acd24e4
Commit
0acd24e4
authored
Nov 16, 2018
by
赵然
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop'
parents
d423bba5
663e8c3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
种红包配置校验_AccessTest.java
src/test/java/http/cases/WalletTest/种红包配置校验_AccessTest.java
+24
-2
No files found.
src/test/java/http/cases/WalletTest/种红包
发券
.java
→
src/test/java/http/cases/WalletTest/种红包
配置校验_AccessTest
.java
View file @
0acd24e4
...
@@ -18,7 +18,7 @@ import java.util.Map;
...
@@ -18,7 +18,7 @@ import java.util.Map;
/**
/**
* Created by mabo on 2018/8/15
* Created by mabo on 2018/8/15
*/
*/
public
class
种红包
发券
extends
DuibaTestBase
{
public
class
种红包
配置校验
_AccessTest
extends
DuibaTestBase
{
@Autowired
@Autowired
SeedRedPacketService
seedRedPacketService
;
SeedRedPacketService
seedRedPacketService
;
...
@@ -40,10 +40,25 @@ public class 种红包发券 extends DuibaTestBase{
...
@@ -40,10 +40,25 @@ public class 种红包发券 extends DuibaTestBase{
String
adPositions
=
response
.
jsonPath
().
getString
(
"data.adPositions"
);
String
adPositions
=
response
.
jsonPath
().
getString
(
"data.adPositions"
);
String
adSwitch
=
response
.
jsonPath
().
getString
(
"data.adSwitch"
);
String
adSwitch
=
response
.
jsonPath
().
getString
(
"data.adSwitch"
);
String
drawNumDaily
=
response
.
jsonPath
().
getString
(
"data.drawNumDaily"
);
String
drawNumDaily
=
response
.
jsonPath
().
getString
(
"data.drawNumDaily"
);
String
decrBeginTime
=
response
.
jsonPath
().
getString
(
"data.decrBeginTime"
);
String
decrSwitch
=
response
.
jsonPath
().
getString
(
"data.decrSwitch"
);
String
seedCreditsPrice
=
response
.
jsonPath
().
getString
(
"data.seedCreditsPrice"
);
String
stealRedPacketSwitch
=
response
.
jsonPath
().
getString
(
"data.stealRedPacketSwitch"
);
String
unlockLandCreditsPrice
=
response
.
jsonPath
().
getString
(
"data.unlockLandCreditsPrice"
);
Assert
.
assertEquals
(
adPositions
,
"1,2,3"
,
"发券位置校验异常"
);
Assert
.
assertEquals
(
adPositions
,
"1,2,3"
,
"发券位置校验异常"
);
Assert
.
assertEquals
(
adSwitch
,
"true"
,
"种红包开关校验异常"
);
Assert
.
assertEquals
(
adSwitch
,
"true"
,
"种红包
发券
开关校验异常"
);
Assert
.
assertEquals
(
drawNumDaily
,
"20"
,
"每日中奖个数校验异常"
);
Assert
.
assertEquals
(
drawNumDaily
,
"20"
,
"每日中奖个数校验异常"
);
Assert
.
assertEquals
(
decrSwitch
,
"true"
,
"种红包衰减开关校验异常"
);
Assert
.
assertEquals
(
decrBeginTime
,
"1"
,
"衰减时间校验异常"
);
Assert
.
assertEquals
(
seedCreditsPrice
,
"1"
,
"种红包种植单价校验异常"
);
Assert
.
assertEquals
(
stealRedPacketSwitch
,
"false"
,
"偷红包开关校验异常"
);
Assert
.
assertEquals
(
unlockLandCreditsPrice
,
"300"
,
"解锁土地所需积分校验异常"
);
logger
.
info
(
"种红包的红包配置接口校验正确"
);
}
}
@Test
@Test
...
@@ -52,11 +67,18 @@ public class 种红包发券 extends DuibaTestBase{
...
@@ -52,11 +67,18 @@ public class 种红包发券 extends DuibaTestBase{
Map
cookies
=
authorization
.
dafuwengLogin
(
uid2
);
Map
cookies
=
authorization
.
dafuwengLogin
(
uid2
);
//校验种红包配置
//校验种红包配置
Response
response
=
seedRedPacketService
.
getExtConfig
(
cookies
);
Response
response
=
seedRedPacketService
.
getExtConfig
(
cookies
);
response
.
prettyPrint
();
String
adPositions
=
response
.
jsonPath
().
getString
(
"data.adPositions"
);
String
adPositions
=
response
.
jsonPath
().
getString
(
"data.adPositions"
);
String
adSwitch
=
response
.
jsonPath
().
getString
(
"data.adSwitch"
);
String
adSwitch
=
response
.
jsonPath
().
getString
(
"data.adSwitch"
);
String
decrBeginTime
=
response
.
jsonPath
().
getString
(
"data.decrBeginTime"
);
String
decrSwitch
=
response
.
jsonPath
().
getString
(
"data.decrSwitch"
);
Assert
.
assertNull
(
adPositions
,
"发券位置校验异常"
);
Assert
.
assertNull
(
adPositions
,
"发券位置校验异常"
);
Assert
.
assertEquals
(
adSwitch
,
"false"
,
"种红包开关校验异常"
);
Assert
.
assertEquals
(
adSwitch
,
"false"
,
"种红包开关校验异常"
);
Assert
.
assertEquals
(
decrSwitch
,
"false"
,
"种红包衰减开关校验异常"
);
Assert
.
assertNull
(
decrBeginTime
,
"衰减时间校验异常"
);
logger
.
info
(
"种红包的红包配置接口校验正确"
);
}
}
}
}
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