Commit 657d86cc authored by haojiahong's avatar haojiahong

京东扣减查询积分单测

parent 927e8357
......@@ -44,6 +44,8 @@ dependencies {
compile 'org.apache.httpcomponents:httpcore-nio:4.4.11'
compile 'org.apache.httpcomponents:httpclient:4.5.9'
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.aspectj:aspectjweaver:1.8.11")
//http
......
......@@ -28,7 +28,7 @@ class JdApiUtilTest extends BaseTest {
private static final String pin;
static {
accessToken = "51a1123d18064b969a2c773546998c12ntfh";
accessToken = "d8743865ca5747b1be667cbb59d469524njv";
token = "AAFg0zTjADBq_27niwCDbCdJWLXmFpXDjjUb_KtoUVKV59Lq8W5ObIs3RjfJbxhICmxLlZ6kc9Q";
shopId = 10139787L;
venderId = 10276497L;
......@@ -136,6 +136,21 @@ class JdApiUtilTest extends BaseTest {
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
void addCartItemByPin() {
Result<Boolean> result = jdApiUtil.addCartItemByPin(JdAppEnum.DUIBA, pin, "10021084856048", 101, accessToken);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment