InterviewSolution
| 1. |
What Are Unfinished Verification/stubbing Errors? |
|
Answer» Mockito validates if you use it correctly all the time. Examples of incorrect use: //Oups, SOMEONE forgot THENRETURN() PART: Mockito THROWS exceptions if you misuse it so that you will know if your tests are written correctly. The only problem is that Mockito does the VALIDATION next time you use the framework. Therefore sometimes the exception is thrown in the next test and you have to manually find the previous test that was not written correctly. Mockito validates if you use it correctly all the time. Examples of incorrect use: //Oups, someone forgot thenReturn() part: Mockito throws exceptions if you misuse it so that you will know if your tests are written correctly. The only problem is that Mockito does the validation next time you use the framework. Therefore sometimes the exception is thrown in the next test and you have to manually find the previous test that was not written correctly. |
|