From 63108d80c9dfa941f43b72ab58acccf1ddfc03aa Mon Sep 17 00:00:00 2001
From: liriming <1343021927@qq.com>
Date: 星期三, 19 三月 2025 11:27:20 +0800
Subject: [PATCH] sdk

---
 iailab-plat-sdk/src/test/java/com/iailab/sdk/IailabClientTest.java |   36 ++++++++++++++++++++++++++----------
 1 files changed, 26 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..aff430f 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,13 @@
 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 com.iailab.sdk.auth.client.dto.PowerRunStateDTO;
+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 +19,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 +43,22 @@
         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);
+    }
+
+    @Test
+    public void testGetPowerRunState() {
+        CommonResult<List<PowerRunStateDTO>> list = IailabClient.getInstance().getPowerRunState();
+        System.out.println(list);
+    }
 
 }

--
Gitblit v1.9.3