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
71f930b2
Commit
71f930b2
authored
May 30, 2019
by
吕雯燕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lv
parent
c5bec6fa
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
0 deletions
+72
-0
新Qb_兑换流程测试_ExchangeTest.java
...ases/ExchangeTest/兑吧_直充类商品兑换/新Qb_兑换流程测试_ExchangeTest.java
+0
-0
gawService.java
src/test/java/http/service/app/gawService.java
+72
-0
No files found.
src/test/java/http/cases/ExchangeTest/兑吧_直充类商品兑换/新Qb_兑换流程测试_ExchangeTest.java
0 → 100644
View file @
71f930b2
This diff is collapsed.
Click to expand it.
src/test/java/http/service/app/gawService.java
View file @
71f930b2
...
...
@@ -504,6 +504,78 @@ public class gawService {
return
response
;
}
//新Qb兑换接口
public
Response
qbExchange
(
int
uid
,
String
actualCredits
,
String
degreeId
,
String
appItemId
,
String
credits
,
String
qq
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
mapList
=
new
HashMap
<>();
List
<
Map
>
list
=
new
ArrayList
<>();
mapList
.
put
(
"appItemId"
,
appItemId
);
mapList
.
put
(
"credits"
,
credits
);
list
.
add
(
mapList
);
map
.
put
(
"actualCredits"
,
actualCredits
);
//总积分
map
.
put
(
"actualPrice"
,
"0"
);
map
.
put
(
"degreeId"
,
degreeId
);
map
.
put
(
"itemParam"
,
list
.
toArray
());
map
.
put
(
"qq"
,
qq
);
map
.
put
(
"remark"
,
""
);
map
.
put
(
"token"
,
"yrJRr7Cddp2YeQd"
);
map
.
put
(
"validate"
,
""
);
JSONObject
jsonParam
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
map
));
logger
.
info
(
"请求Qb兑换接口:"
+
"/gaw/qbExchange/create"
);
Response
response
=
given
().
contentType
(
"application/json; charset=UTF-8"
).
cookies
(
authorization
.
dafuwengLogin
(
uid
)).
body
(
jsonParam
).
post
(
"http://"
+
goodsHost
+
"/gaw/qbExchange/create"
);
try
{
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"success"
),
"true"
);
}
catch
(
Exception
e
){
throw
new
Exception
(
"/gaw/qbExchange/create接口返回异常,返回信息:"
+
response
.
asString
());
}
catch
(
Error
er
){
throw
new
Exception
(
"/gaw/qbExchange/create接口返回异常,返回信息:"
+
response
.
asString
());
}
return
response
;
}
public
Response
qbExchange
(
Map
cookies
,
String
actualCredits
,
String
degreeId
,
String
appItemId
,
String
credits
,
String
qq
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
mapList
=
new
HashMap
<>();
List
<
Map
>
list
=
new
ArrayList
<>();
mapList
.
put
(
"appItemId"
,
appItemId
);
mapList
.
put
(
"credits"
,
credits
);
list
.
add
(
mapList
);
map
.
put
(
"actualCredits"
,
actualCredits
);
//总积分
map
.
put
(
"actualPrice"
,
"0"
);
map
.
put
(
"degreeId"
,
degreeId
);
map
.
put
(
"itemParam"
,
list
.
toArray
());
map
.
put
(
"qq"
,
qq
);
map
.
put
(
"remark"
,
""
);
map
.
put
(
"token"
,
"yrJRr7Cddp2YeQd"
);
map
.
put
(
"validate"
,
""
);
JSONObject
jsonParam
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
map
));
logger
.
info
(
"请求Qb兑换接口:"
+
"/gaw/qbExchange/create"
);
Response
response
=
given
().
contentType
(
"application/json; charset=UTF-8"
).
cookies
(
cookies
).
body
(
jsonParam
).
post
(
"http://"
+
goodsHost
+
"/gaw/qbExchange/create"
);
try
{
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"success"
),
"true"
);
}
catch
(
Exception
e
){
throw
new
Exception
(
"/gaw/qbExchange/create接口返回异常,返回信息:"
+
response
.
asString
());
}
catch
(
Error
er
){
throw
new
Exception
(
"/gaw/qbExchange/create接口返回异常,返回信息:"
+
response
.
asString
());
}
return
response
;
}
}
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