5 Comments
User's avatar
⭠ Return to thread
Yarik Yermilov's avatar

It is always better to follow such rules:

- use real code for system's under test dependencies

- if not possible, replace it with test double (like in-memory database)

- if not possible, replace it with mock object

- never test behaviour (method X was invoked), test state or returned result

Expand full comment
Georges El Khoury's avatar

I really like these guidances. Will incorporate them.

Expand full comment