简体   繁体   中英

How to mock a JSON document for test using spring boot and mockito

在 Spring Boot 测试中,如何测试使用 JSON 文档(json 对象列表)的方法对其进行解析,对数据进行处理并返回对象列表。

您可以将 Json 对象保存在 src/test/resources 目录中,然后您可以在测试用例中读取它并将其作为输入传递给您的测试用例

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM