如何使用Spring Boot和Mockito模拟JSON文档进行测试
在Spring Boot测试中,如何测试一种消耗JSON文档(JSON对象列表)的方法,对数据进行处理,对数据进行处理并返回对象列表。
In spring boot test, How to test a method that consumes a JSON Document (list of json object) parses it, does a processing on the data and return a list of objects.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将JSON对象保存在SRC/Test/Resources目录中,并且可以在测试案例中阅读并将其传递给测试案例的输入
You can keep the Json object in your src/test/resources directory and than you can read it inside your test case and pass it as an input to your test case