|
|
|
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
|
+} |