From ead3a7406d18f4f2ee5afe581bcb04f8d64fcb5e Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期日, 23 三月 2025 14:36:20 +0800 Subject: [PATCH] curData + T+L --- iailab-plat-sdk/src/test/java/com/iailab/sdk/IailabClientTest.java | 29 +++++++++++++++++++---------- 1 files changed, 19 insertions(+), 10 deletions(-) diff --git a/iailab-plat-sdk/src/test/java/com/iailab/sdk/IailabClientTest.java b/iailab-plat-sdk/src/test/java/com/iailab/sdk/IailabClientTest.java index 9ca7867..13fc2ca 100644 --- a/iailab-plat-sdk/src/test/java/com/iailab/sdk/IailabClientTest.java +++ b/iailab-plat-sdk/src/test/java/com/iailab/sdk/IailabClientTest.java @@ -1,12 +1,12 @@ package com.iailab.sdk; -import com.iailab.framework.test.core.ut.BaseMockitoUnitTest; -import com.iailab.sdk.auth.client.IailabAuthClient; -import com.iailab.sdk.auth.client.dto.TokenDTO; -import com.iailab.sdk.auth.client.vo.AuthLoginReqVO; -import org.junit.jupiter.api.Test; +import com.iailab.sdk.auth.client.IailabClient; +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 javax.annotation.Resource; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -18,17 +18,19 @@ * * @author iailab */ -public class IailabClientTest extends BaseMockitoUnitTest { +@RunWith(SpringRunner.class) +@SpringBootTest +public class IailabClientTest { @Test public void testLogin() { - IailabAuthClient.authenticate(); + IailabClient.authenticate(); } @Test public void testRefreshToken() throws Exception { // 准备参数 - IailabAuthClient.refreshToken(); + IailabClient.refreshToken(); } @Test @@ -40,9 +42,16 @@ itemNos.add("P0000100010"); params.put("itemNos", itemNos); // 准备参数 - String s = IailabAuthClient.doHttp("POST", "http://172.16.8.100/admin-api/data/api/query-plans/chart", params); + String s = IailabClient.doHttp("POST", "http://172.16.8.100/admin-api/data/api/query-plans/chart", params); System.out.println(s); } + @Test + public void testQueryPointsRealValue() { + List<String> pointNos = new ArrayList<>(); + pointNos.add("111"); + CommonResult<Map<String, Object>> stringObjectMap = IailabClient.getInstance().queryPointsRealValue(pointNos); + System.out.println(stringObjectMap); + } } -- Gitblit v1.9.3