mirror of https://gitee.com/stylefeng/roses
【8.3.0】【scanner】【test】更新测试分页结果的类
parent
6c533b4c6e
commit
564644b82e
|
@ -48,6 +48,12 @@
|
||||||
<artifactId>spring-boot-starter-validation</artifactId>
|
<artifactId>spring-boot-starter-validation</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.javaguns.roses</groupId>
|
||||||
|
<artifactId>db-api</artifactId>
|
||||||
|
<version>${roses.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@ package cn.stylefeng.roses.kernel.scanner.api;
|
||||||
import cn.hutool.core.collection.ListUtil;
|
import cn.hutool.core.collection.ListUtil;
|
||||||
import cn.hutool.core.lang.TypeReference;
|
import cn.hutool.core.lang.TypeReference;
|
||||||
import cn.hutool.core.util.IdUtil;
|
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.factory.ClassMetaFactory;
|
||||||
import cn.stylefeng.roses.kernel.scanner.api.pojo.SimpleObject;
|
import cn.stylefeng.roses.kernel.scanner.api.pojo.SimpleObject;
|
||||||
import cn.stylefeng.roses.kernel.scanner.api.pojo.resource.FieldMetadata;
|
import cn.stylefeng.roses.kernel.scanner.api.pojo.resource.FieldMetadata;
|
||||||
|
@ -39,4 +41,17 @@ public class TestObject {
|
||||||
System.out.println(jsonString);
|
System.out.println(jsonString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testPageResult() {
|
||||||
|
Type type = new TypeReference<ResponseData<PageResult<SimpleObject>>>() {
|
||||||
|
}.getType();
|
||||||
|
|
||||||
|
FieldMetadata fieldMetadata = ClassMetaFactory.beginCreateFieldMetadata(type, IdUtil.fastSimpleUUID());
|
||||||
|
|
||||||
|
String jsonString = JSON.toJSONString(fieldMetadata, JSONWriter.Feature.PrettyFormat);
|
||||||
|
|
||||||
|
System.out.println(jsonString);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue