3 ms·
Exactly. An other reason could be it's a main entry point for code execution, a class that only purpose is the glue others. In that case, having a lot of mock
by oelmekki 12y ago
Exactly.
An other reason could be it's a main entry point for code execution, a class that only purpose is the glue others.
In that case, having a lot of mocks is a code smell pointing that you should probably test this on the integration level rather than on the unit one (and thus, discard mocks and use "real" everything).
(but beware not to be too much self indulgent on what is a gluing class, most of the time, they are not and it's indeed a god class problem).