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
I really like these guidances. Will incorporate them.
For your security, we need to re-authenticate you.
Click the link we sent to , or click here to sign in.
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
I really like these guidances. Will incorporate them.