New answers tagged

1

Mocking should only be used as a last resort, even in unit tests. A method is not a unit, and even a class is not a unit. A unit is any logical separation of code that makes sense, regardless of what you call it. An important element of having well tested code is being able to freely refactor, and part of being able to freely refactor means that you don't ...


Top 50 recent answers are included