Showing
3 changed files
with
35 additions
and
3 deletions
@@ -3,7 +3,7 @@ git add --all src/* | @@ -3,7 +3,7 @@ git add --all src/* | ||
3 | git add --all lib/* | 3 | git add --all lib/* |
4 | git add push.sh | 4 | git add push.sh |
5 | git add pom.xml | 5 | git add pom.xml |
6 | -git commit -m "MOD data share" | 6 | +git commit -m "add hasReport" |
7 | git push origin master | 7 | git push origin master |
8 | git status | 8 | git status |
9 | git pull | 9 | git pull |
@@ -8,8 +8,8 @@ public interface Constants { | @@ -8,8 +8,8 @@ public interface Constants { | ||
8 | * 服务地址 | 8 | * 服务地址 |
9 | */ | 9 | */ |
10 | // String URL_PREFIX = "http://127.0.0.1:8090"; | 10 | // String URL_PREFIX = "http://127.0.0.1:8090"; |
11 | - String URL_PREFIX = "https://www.hanhezy.com:8090/"; | ||
12 | - | 11 | +// String URL_PREFIX = "https://www.hanhezy.com:8090/"; |
12 | + String URL_PREFIX = "https://api.xkljk.com/"; | ||
13 | /** | 13 | /** |
14 | * 测试用 用户名、密码、openid、openidtype | 14 | * 测试用 用户名、密码、openid、openidtype |
15 | */ | 15 | */ |
1 | +package com.xkl.internal; | ||
2 | + | ||
3 | +import com.xkl.Constants; | ||
4 | +import com.xkl.HttpTools; | ||
5 | +import com.xkl.RtnCodeTools; | ||
6 | +import com.xkl.partner.TokenTest; | ||
7 | +import org.junit.Assert; | ||
8 | +import org.junit.Test; | ||
9 | + | ||
10 | +import java.util.HashMap; | ||
11 | +import java.util.Map; | ||
12 | + | ||
13 | +/** | ||
14 | + * zhaoyue 2017-05-13 | ||
15 | + */ | ||
16 | +public class HasReportTest { | ||
17 | + private static final String URL_HAS_REPORT = Constants.URL_PREFIX + "/hasReport"; | ||
18 | + | ||
19 | + @Test | ||
20 | + public void testHasReport() { | ||
21 | + Map<String, String> params = new HashMap<String, String>(); | ||
22 | + params.put("username", Constants.USR_ACC); | ||
23 | + params.put("t", HttpTools.getNow()); | ||
24 | + params.put("type", Constants.KEY_ID); | ||
25 | + params.put("sign", HttpTools.getSign(params)); | ||
26 | + String response = HttpTools.requestByMap(URL_HAS_REPORT, "GET", params); | ||
27 | + System.out.println(response); | ||
28 | + // RtnCodeTools.verifyCode(response, 11400) || | ||
29 | + // 返回11401有报告,11400没有报告 | ||
30 | + Assert.assertTrue(RtnCodeTools.verifyCode(response, 11401)); | ||
31 | + } | ||
32 | +} |
-
Please register or login to post a comment