zixi0825 commented on pull request #3053:

   > > > Hi @dailidong .
   > > > When I want to add the unit test case in 
`ProcessDefinitionControllerTest`, I found the 
`ProcessDefinitionControllerTest` is ran with the `MockitoJUnitRunner` but not 
the `SpringRunner` like the other controller test cases. I checked the history 
log and found @zixi0825 changed it from `SpringRunner` to `MockitoJUnitRunner` 
in `ProcessDefinitionControllerTest`.
   > > > Hi @zixi0825 , can you help me to understand why changed 
`SpringRunner` to `MockitoJUnitRunner`, Thx a lot.
   > > 
   > > 
   > > MockitoJUnitRunner is used to simulate spring injection objects.
   > > like this : 
   > Hi @zixi0825 , thx a lot for your answer.
   > What I actually want to know is why we need to change the 
`ProcessDefinitionControllerTest` test component from `SpringRunner` to 
`MockitoJUnitRunner`. Is it necessary for us to keep all the ApiTestCase 
consistent(Replace to MockitoJUnitRunner or SpringRunner)?
   > 非常感谢你的回答。
   > 但是我想了解的是之前是有什么场景需要我们把`ProcessDefinitionControllerTest` 
的测试组件从`SpringRunner` 换为`MockitoJUnitRunner` 吗?
   > 我们是否有必要将api层所有的测试框架统一(全部换为MockitoJUnitRunner或者SpringRunner)?
   1.  SpringRunner has no way to simulate object dependency injection
   2. Whether it is unified depends on whether  MockitoJUnitRunner or 
SpringRunner can meet all needs
   1. SpringRunner没办法模拟对象的依赖注入
   2. 是否全部替换MockitoJUnitRunner或者SpringRunner取决它们其中一个是否能满足所有需求,这个需要研究一下,不然会做无用功

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

Reply via email to