DEV Community

Discussion on: Unit Testing: Mocks

Collapse
 
joro550 profile image
Mark Davies

Awesome blog post! It's always important to know when and how to mock, I think most developers go for mocking framework a little too quickly these days when a simple fake would suffice. I don't know if I agree 100% on what you say is an integration test, just because we're using another class (or dependency) doesn't immediately make it an integration test, I would say it was an integration test because it was calling into the database - a different subsystem, if we were to replace the database with an in memory database I would still call that a unit test. But opinions are opinions. 😁