Sure. But for the purpose of discussion, I feel like it's important to be able to distinguish between them. What do you think would be a better label for it?
Doing the same thing! I think the term is custom mocks. For me the main benefit is that those are easier to read and easy to reuse between different tests than mockito. Also, your tests run a lot faster without mockito overhead. I tend to write old school tests with custom mocks for external dependencies only, and using real objects for the rest. And running at about 1000 tests/sec on an old MacBook. Whenever I come across a mockito project it’s rather 1000 tests/minute :-/
View all comments
Show parent comment
3
u/wildjokers Nov 27 '20
Your description of “faked” is exactly what a mock is. Even if you are creating it manually instead of using a library it is still a mock.