houzhongjian
2025-03-14 c09880d791eccb623be595aeb11d6ce0c4561a3f
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
38
39
40
41
42
43
44
45
46
47
48
49
package com.iailab.sdk.demo;
 
import com.iailab.sdk.auth.client.common.pojo.CommonResult;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
 
import java.util.Map;
 
 
@RunWith(SpringRunner.class)
@SpringBootTest
public class HttpClientDemoTest{
 
    @Autowired
    private HttpClientDemo httpClientDemo;
 
 
    @Test
    public void authenticate() {
        httpClientDemo.authenticate();
    }
 
    @Test
    public void refreshToken() throws Exception {
        httpClientDemo.refreshToken();
    }
 
 
    @Test
    public void testQueryPointsRealValue() throws Exception {
        CommonResult<Map<String, Object>> mapCommonResult = httpClientDemo.queryPointsRealValue();
        System.out.println(mapCommonResult.getData());
    }
 
    @Test
    public void testDoHttpPost() throws Exception {
        // 准备参数
        httpClientDemo.doHttpPost();
    }
 
    @Test
    public void testDoHttpGet() throws Exception {
        // 准备参数
        httpClientDemo.doHttpGet();
    }
}