Testing · Junior · Question 35 of 78
What is a stub?
- ✓Correct answer: A double that returns prepared answers so the code under test can run
- 2A double that fails the test if it is called
- 3A real object connected to a test database
Explanation
Stubs feed data in; mocks are used to verify interactions (calls). Fakes are simplified working implementations, like an in-memory repository.