package com.iailab.sdk.demo;
|
|
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 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);
|
}
|
|
@Test
|
public void testDoHttpPost() throws Exception {
|
// 准备参数
|
httpClientDemo.doHttpPost();
|
}
|
|
@Test
|
public void testDoHttpGet() throws Exception {
|
// 准备参数
|
httpClientDemo.doHttpGet();
|
}
|
}
|