InterviewSolution
Saved Bookmarks
| 1. |
What is the difference between thenReturn and doReturn? |
|
Answer» THENRETURN and doReturn are used for setting up stubs and are provided by the Mockito framework. They are generally used along with when clause as --> when-thenReturn and doReturn-when. when-thenReturn is used in most cases due to better readability. Following are the differences between thenReturn and doReturn:
|
|