From 564644b82e991e502cf2e5daf1160a0ac5803fec Mon Sep 17 00:00:00 2001 From: stylefeng Date: Wed, 7 Aug 2024 16:41:36 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=908.3.0=E3=80=91=E3=80=90scanner?= =?UTF-8?q?=E3=80=91=E3=80=90test=E3=80=91=E6=9B=B4=E6=96=B0=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E5=88=86=E9=A1=B5=E7=BB=93=E6=9E=9C=E7=9A=84=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel-d-scanner/scanner-api/pom.xml | 6 ++++++ .../roses/kernel/scanner/api/TestObject.java | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/kernel-d-scanner/scanner-api/pom.xml b/kernel-d-scanner/scanner-api/pom.xml index 17f1f4279..b0e826e9d 100644 --- a/kernel-d-scanner/scanner-api/pom.xml +++ b/kernel-d-scanner/scanner-api/pom.xml @@ -48,6 +48,12 @@ spring-boot-starter-validation test + + com.javaguns.roses + db-api + ${roses.version} + test + diff --git a/kernel-d-scanner/scanner-api/src/test/java/cn/stylefeng/roses/kernel/scanner/api/TestObject.java b/kernel-d-scanner/scanner-api/src/test/java/cn/stylefeng/roses/kernel/scanner/api/TestObject.java index 91dc65286..98ed6e195 100644 --- a/kernel-d-scanner/scanner-api/src/test/java/cn/stylefeng/roses/kernel/scanner/api/TestObject.java +++ b/kernel-d-scanner/scanner-api/src/test/java/cn/stylefeng/roses/kernel/scanner/api/TestObject.java @@ -3,6 +3,8 @@ package cn.stylefeng.roses.kernel.scanner.api; import cn.hutool.core.collection.ListUtil; import cn.hutool.core.lang.TypeReference; import cn.hutool.core.util.IdUtil; +import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult; +import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData; import cn.stylefeng.roses.kernel.scanner.api.factory.ClassMetaFactory; import cn.stylefeng.roses.kernel.scanner.api.pojo.SimpleObject; import cn.stylefeng.roses.kernel.scanner.api.pojo.resource.FieldMetadata; @@ -39,4 +41,17 @@ public class TestObject { System.out.println(jsonString); } + @Test + public void testPageResult() { + Type type = new TypeReference>>() { + }.getType(); + + FieldMetadata fieldMetadata = ClassMetaFactory.beginCreateFieldMetadata(type, IdUtil.fastSimpleUUID()); + + String jsonString = JSON.toJSONString(fieldMetadata, JSONWriter.Feature.PrettyFormat); + + System.out.println(jsonString); + } + + }