Wednesday, July 30, 2025

Dummy Vs Stub Vs fake

 Do I need to pass an object just to satisfy the method signature?
→ Use a Dummy

Do I need to simulate return values (e.g., from a repository)?
→ Use a Stub

Do I need to simulate real logic or store data?
→ Use a Fake

No comments:

Post a Comment

Clean code chapter 3(Robert C.martin)

  Summary: --------  1. Functions should hardly ever be 20 lines long.  2.Keep blocks (inside if, else, while, for, etc.) short.  Ideally, j...