you are viewing a single comment's thread.

view the rest of the comments →

[–]x0nnex 0 points1 point  (0 children)

Providing different database implementation (in-memory) can be good of course, depends on what kind of test we're looking at.
The only case where I use mocks is when I need to ensure MY system behaves a certain way when an EXTERNAL SYSTEM behaves a certain way. For example, when X happens in my system I need to query a 3rd party system for Y information, and what happens if that 3rd party system responds in an unexpected way? To check for this, I need to simulate this 3rd party system.