Mock vs Fake test doubles: when to use a Fake Repository?

Tests if you know a Fake is a working lightweight implementation while a Mock verifies interactions. Good answers define Fake as in-memory with real logic, Mock as expectation-based, and choose a Repository Fake when many tests need reusable state.
Tests whether you understand that a Fake is a lightweight working implementation while a Mock is an object used to verify interactions. A strong answer defines a Fake as an in-memory substitute with real logic but simplified dependencies, defines a Mock as an expectation-based spy, and selects a Repository Fake when many tests need stable, reusable stateful behavior without brittle setup. Red flag: treating the terms as interchangeable or claiming a Fake requires a mocking framework.
Read the original → developer.android.com
- #android
- #testing
- #test-doubles
- #repository-pattern
- #mock-vs-fake
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.