| | |
| | | package com.iailab.sdk.demo; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.iailab.sdk.auth.client.common.pojo.CommonResult; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | |
| | | private HttpClientDemo httpClientDemo; |
| | | |
| | | |
| | | /*@Test |
| | | @Test |
| | | public void authenticate() { |
| | | httpClientDemo.authenticate(); |
| | | } |
| | |
| | | httpClientDemo.refreshToken(); |
| | | } |
| | | |
| | | @Test |
| | | public void testQueryPlanChart() throws Exception { |
| | | Map<String, Object> stringObjectMap = httpClientDemo.queryPlanChart(); |
| | | System.out.println(stringObjectMap); |
| | | } |
| | | |
| | | @Test |
| | | public void testQueryPointsRealValue() throws Exception { |
| | | Map<String, Object> stringObjectMap = httpClientDemo.queryPointsRealValue(); |
| | | System.out.println(stringObjectMap); |
| | | CommonResult<Map<String, Object>> mapCommonResult = httpClientDemo.queryPointsRealValue(); |
| | | System.out.println(mapCommonResult.getData()); |
| | | } |
| | | |
| | | @Test |
| | |
| | | public void testDoHttpGet() throws Exception { |
| | | // 准备参数 |
| | | httpClientDemo.doHttpGet(); |
| | | }*/ |
| | | |
| | | @Test |
| | | public void testDoHttpGet() throws Exception { |
| | | // 准备参数 |
| | | List<String> params = new ArrayList<String>(); |
| | | params.add("M0000101153"); |
| | | CommonResult<Map<String, Object>> mapCommonResult = httpClientDemo.queryPointsRealValue(params); |
| | | System.out.println(JSONObject.toJSONString(mapCommonResult)); |
| | | } |
| | | } |