- Date: 2024-07-15
- Decision taken by: Laurent DUTHEIL
- Status: accepted
As:
- the Stub structure handles the prepared calls
- the Mock structure handles the assertions
- a call of a stubbed method don't fail the test (except if we have to return something that was not predefined)
- a stubbed method that is not called don't fail the test
I think we don't need the Maybe()
and Unset()
methods
- Option 1:
- Don't implement
Maybe()
andUnset()
methods - ✅ Advantage:
- simpler API
- simple implementation
- these methods are not used a lot
- 🚫 Disadvantage:
- break the retro-compatibility
- have to explain the migration
- Don't implement
- Option 2:
- Implement
Maybe()
andUnset()
methods - ✅ Advantage:
- don't break the retro-compatibility
- 🚫 Disadvantage:
- the methods do nothing
- Implement
Option 1: Don't implement Maybe()
and Unset()
methods
TODO: write a migration documentation