From c09880d791eccb623be595aeb11d6ce0c4561a3f Mon Sep 17 00:00:00 2001 From: houzhongjian <houzhongyi@126.com> Date: 星期五, 14 三月 2025 15:50:46 +0800 Subject: [PATCH] sdk密码授权模式修改为客户端模式,只需要用户名和客户端id、secret --- src/test/java/com/iailab/sdk/demo/HttpClientDemoTest.java | 24 ++++++++++-------------- 1 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/test/java/com/iailab/sdk/demo/HttpClientDemoTest.java b/src/test/java/com/iailab/sdk/demo/HttpClientDemoTest.java index cb7d2d4..7a62ee0 100644 --- a/src/test/java/com/iailab/sdk/demo/HttpClientDemoTest.java +++ b/src/test/java/com/iailab/sdk/demo/HttpClientDemoTest.java @@ -1,10 +1,13 @@ 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) @@ -14,20 +17,6 @@ @Autowired private HttpClientDemo httpClientDemo; - @Test - public void testDoGet() throws Exception { - httpClientDemo.HttpGet(); - } - - @Test - public void testDoPost() throws Exception { - httpClientDemo.HttpPost(); - } - - @Test - public void testGetDeviceValue() throws Exception { - httpClientDemo.HttpGetDeviceValue(); - } @Test public void authenticate() { @@ -39,6 +28,13 @@ 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 { // 准备参数 -- Gitblit v1.9.3