Hacker News new | ask | show | jobs
by Sankozi 1353 days ago
If static method behaves like a function I see very little reason for mocking. Do people mock also calls to complex constructors (which are too static methods)?

I think some people put unit testing to the extreme by not wanting to test logic outside of the unit tested (which is not possible to do fully). They write additional code for mocks so their tests could be less useful but more "pure".