While this might sound great to be able to mock anything, this should not be a valid reason to do it.
Mocking, especially with private functions or hierarchy of mocks may lead to very brittle tests. I suggest using those features with special care.
l
LeoColman
05/22/2019, 1:28 PM
I agree. I usually use these features when the code is in a legacy state, and I need to test it anyway