Usually unit tests cover public methods from @Service annotated class (and other components).
Testing with HTTP client is more like writing integration tests, which cover connection between different systems - just like in the case of HTTP API, that is called either by your different service or by other component independent from your system.
PS: Welcome on StackOverflow, I hope that you will find your answers. :)
发布评论
评论(1)
通常,单位测试涵盖@Service注释的类(和其他组件)的公共方法。
使用HTTP客户端进行测试更像是编写集成测试,这些集成测试涵盖了不同系统之间的连接 - 就像在HTTP API的情况下一样,这是由您的不同服务或其他与系统独立于系统的组件调用的。
PS:欢迎使用Stackoverflow,希望您能找到答案。 :)
Usually unit tests cover public methods from @Service annotated class (and other components).
Testing with HTTP client is more like writing integration tests, which cover connection between different systems - just like in the case of HTTP API, that is called either by your different service or by other component independent from your system.
PS: Welcome on StackOverflow, I hope that you will find your answers. :)