2 ms·
Just want to agree with your sentiment here. I have tried on many occasions to incorporate mocking frameworks into my unit tests, and in almost all cases the m
by tigeba 13y ago
Just want to agree with your sentiment here. I have tried on many occasions to incorporate mocking frameworks into my unit tests, and in almost all cases the mocks cause more problems than they solve. Either I'm spending time debugging the buggy behavior of the mock objects themselves, or my test writing is slowed down with a bunch of tedious minutiae about the expectations of the mock framework. For whatever reason I have also found the mock-based tests to be very difficult to refactor when required.
I generally prefer to write a mix of unit and integration tests, and I typically find the integration tests to be more useful.