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
c0463881
Commit
c0463881
authored
Nov 09, 2018
by
赵然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zr
parent
0e7d2a57
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
5 deletions
+31
-5
种红包条件解锁_AccessTest.java
src/test/java/http/cases/WalletTest/种红包条件解锁_AccessTest.java
+31
-5
No files found.
src/test/java/http/cases/WalletTest/种红包条件解锁_AccessTest.java
View file @
c0463881
...
@@ -7,21 +7,22 @@ import http.service.Activity.WalletAccountService;
...
@@ -7,21 +7,22 @@ import http.service.Activity.WalletAccountService;
import
http.service.Authorization
;
import
http.service.Authorization
;
import
io.restassured.response.Response
;
import
io.restassured.response.Response
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.testng.Assert
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
org.testng.annotations.Test
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Locale
;
import
static
io
.
restassured
.
RestAssured
.
given
;
import
java.util.Map
;
/**
/**
* Created by mabo on 2018/8/15
* Created by mabo on 2018/8/15
*/
*/
public
class
种红包条件解锁
_AccessTest
extends
DuibaTestBase
{
public
class
种红包条件解锁
_AccessTest
extends
DuibaTestBase
{
@Value
(
"${activity.host}"
)
String
activityHost
;
@Autowired
@Autowired
SeedRedPacketService
seedRedPacketService
;
SeedRedPacketService
seedRedPacketService
;
@Autowired
@Autowired
...
@@ -66,6 +67,31 @@ public class 种红包条件解锁_AccessTest extends DuibaTestBase{
...
@@ -66,6 +67,31 @@ public class 种红包条件解锁_AccessTest extends DuibaTestBase{
Assert
.
assertEquals
(
landStatus
,
"3"
,
"第四块土地状态校验失败"
);
Assert
.
assertEquals
(
landStatus
,
"3"
,
"第四块土地状态校验失败"
);
}
}
@Test
(
description
=
"第四块土地消耗积分解锁"
)
public
void
第四块土地解锁
_
未达条件
()
throws
Exception
{
//dafuweng登陆获取cookies
Map
cookies
=
authorization
.
dafuwengLogin
(
4582
);
//调用getLandList接口
Response
response
=
seedRedPacketService
.
getLandList
(
cookies
,
"1"
,
"424"
);
String
landStatus
=
response
.
jsonPath
().
getString
(
"data.landList[3].landStatus"
);
logger
.
info
(
"第四块土地状态为:未解锁-"
+
landStatus
);
Assert
.
assertEquals
(
landStatus
,
"1"
,
"第四块土地状态校验失败"
);
//调用解锁土地接口
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"activityId"
,
"1"
);
map
.
put
(
"floorId"
,
"424"
);
map
.
put
(
"landId"
,
"4"
);
map
.
put
(
"dcm"
,
"228.4.2.0"
);
map
.
put
(
"dpm"
,
"19380.5.424.4"
);
logger
.
info
(
"请求unlockLand接口,landId=4"
);
response
=
given
().
cookies
(
cookies
).
params
(
map
).
get
(
activityHost
+
"/seedRedPacket/unlockLand"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"success"
),
"false"
,
"/seedRedPacket/seed接口失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"desc"
),
"用户地块不是可解锁状态"
,
"/seedRedPacket/seed接口失败"
);
logger
.
info
(
"用户未达条件,地块不是可解锁状态"
);
}
@Test
(
description
=
"第六块土地兑换一次解锁"
)
@Test
(
description
=
"第六块土地兑换一次解锁"
)
public
void
第六块土地解锁
()
throws
Exception
{
public
void
第六块土地解锁
()
throws
Exception
{
//dafuweng登陆获取cookies
//dafuweng登陆获取cookies
...
...
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