There's a large debate going on in our office right now about how and where you should mock external libraries. On one hand, mocking an external library lets you test the boundaries of your system without testing the external system. On the other, by mocking an externality you create an unnatural opportunity for tests to drift from implementation.
We thought it would be cool to open the discussion to the larger community.
A brief overview of what we are discussing:
- Should you mock a strongly typed external library?
- What about something without types?
- What does the mock vs an integration test provide?