zixi0825 commented on pull request #3053:
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/3053#issuecomment-650664056


   > 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 :  
Mockito.when(projectMapper.queryByName(projectName)).thenReturn(getProject(projectName));


----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to