Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

FWIW, you don't do that with Mockito either, in Java land.

Mockito will happily use the existing type definition of your dependency, provided that the class declaration is not final (i.e. can't be extended).



This is actually not a requirement anymore. Mockito 2 can mock final types and methods.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: