ReportTest.java
1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package com.xkl.inneruse;
import com.xkl.Constants;
import com.xkl.HttpTools;
import com.xkl.RtnCodeTools;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import java.util.HashMap;
import java.util.Map;
import static com.xkl.TokenTest.loginAndGetToken;
/**
* Created by win7 on 2016/12/26.
* 报告相关
*/
public class ReportTest {
private static final String URL_REPORT_SCORE = Constants.URL_PREFIX + "/report/score";
/**
* 健康评分接口
*/
@Test
public void testScore() {
Map<String, String> params = new HashMap<String, String>();
params.put("report_id", "77");
params.put("t", HttpTools.getNow());
params.put("type", Constants.KEY_ID);
params.put("sign", HttpTools.getSign(params));
String response = HttpTools.requestByMap(URL_REPORT_SCORE, "GET", params);
System.out.println(response);
Assert.assertTrue(RtnCodeTools.verifyCode(response, Constants.CODE_SUCC));
}
}