Slide 3
Slide 3 text
© 2019 KOKO Networks Limited – Proprietary & Confidential
Relaxed Mock vs Strict Mock
Relaxed Mock:
A relaxed mock is the mock that returns some
simple value for all functions. This allows to skip
specifying behavior for each case, while still
allowing to stub things you need. For reference
types, chained mocks are returned.
Strict Mock:
Forces you to have answer for every method call
on the mocked object
Note:
Mockito generally is relaxed mock by default. For
Mockk, we have to override that, as it is strict by
default. We can override this behaviour globally per
class