Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jd-activity
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
曾水平
jd-activity
Commits
657d86cc
Commit
657d86cc
authored
Jul 19, 2021
by
haojiahong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
京东扣减查询积分单测
parent
927e8357
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
build.gradle
build.gradle
+2
-0
JdApiUtilTest.java
...om/duiba/jdactivity/developer/jd/utils/JdApiUtilTest.java
+16
-1
No files found.
build.gradle
View file @
657d86cc
...
@@ -44,6 +44,8 @@ dependencies {
...
@@ -44,6 +44,8 @@ dependencies {
compile
'org.apache.httpcomponents:httpcore-nio:4.4.11'
compile
'org.apache.httpcomponents:httpcore-nio:4.4.11'
compile
'org.apache.httpcomponents:httpclient:4.5.9'
compile
'org.apache.httpcomponents:httpclient:4.5.9'
testCompile
(
'junit:junit'
)
testCompile
(
'junit:junit'
)
testCompile
(
'org.junit.platform:junit-platform-launcher'
)
testCompile
(
'org.junit.vintage:junit-vintage-engine'
)
compile
'org.bouncycastle:bcprov-jdk15on:1.56'
compile
'org.bouncycastle:bcprov-jdk15on:1.56'
compile
(
"org.aspectj:aspectjweaver:1.8.11"
)
compile
(
"org.aspectj:aspectjweaver:1.8.11"
)
//http
//http
...
...
src/test/java/cn/com/duiba/jdactivity/developer/jd/utils/JdApiUtilTest.java
View file @
657d86cc
...
@@ -28,7 +28,7 @@ class JdApiUtilTest extends BaseTest {
...
@@ -28,7 +28,7 @@ class JdApiUtilTest extends BaseTest {
private
static
final
String
pin
;
private
static
final
String
pin
;
static
{
static
{
accessToken
=
"
51a1123d18064b969a2c773546998c12ntfh
"
;
accessToken
=
"
d8743865ca5747b1be667cbb59d469524njv
"
;
token
=
"AAFg0zTjADBq_27niwCDbCdJWLXmFpXDjjUb_KtoUVKV59Lq8W5ObIs3RjfJbxhICmxLlZ6kc9Q"
;
token
=
"AAFg0zTjADBq_27niwCDbCdJWLXmFpXDjjUb_KtoUVKV59Lq8W5ObIs3RjfJbxhICmxLlZ6kc9Q"
;
shopId
=
10139787L
;
shopId
=
10139787L
;
venderId
=
10276497L
;
venderId
=
10276497L
;
...
@@ -136,6 +136,21 @@ class JdApiUtilTest extends BaseTest {
...
@@ -136,6 +136,21 @@ class JdApiUtilTest extends BaseTest {
Assertions
.
assertTrue
(
result
.
getSuccess
());
Assertions
.
assertTrue
(
result
.
getSuccess
());
}
}
@Test
void
consumePoints
()
{
Result
<
Boolean
>
result
=
jdApiUtil
.
consumePoints
(
JdAppEnum
.
DUIBA
,
pin
,
"businessId01"
,
-
1
,
"aaa"
,
accessToken
);
System
.
out
.
println
(
JSON
.
toJSONString
(
result
));
Assertions
.
assertTrue
(
result
.
getSuccess
());
}
@Test
void
getCustomerPoints
()
{
Result
<
Long
>
customerPoints
=
jdApiUtil
.
getCustomerPoints
(
JdAppEnum
.
DUIBA
,
pin
,
accessToken
);
System
.
out
.
println
(
JSON
.
toJSONString
(
customerPoints
));
}
@Test
@Test
void
addCartItemByPin
()
{
void
addCartItemByPin
()
{
Result
<
Boolean
>
result
=
jdApiUtil
.
addCartItemByPin
(
JdAppEnum
.
DUIBA
,
pin
,
"10021084856048"
,
101
,
accessToken
);
Result
<
Boolean
>
result
=
jdApiUtil
.
addCartItemByPin
(
JdAppEnum
.
DUIBA
,
pin
,
"10021084856048"
,
101
,
accessToken
);
...
...
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