3 ms·
You're mixing up interface and implementation. You should be able to change how you implement the association without changing the interface or breaking the te
by gnaritas 15y ago
You're mixing up interface and implementation. You should be able to change how you implement the association without changing the interface or breaking the test; unless your test knows too much about the internals of the implementation, in which case it's a poorly written test.
- _delirium 15y agoThat's the OO theory, but interfaces do frequently change in any codebase that isn't mature, because it's not always clear up front what the interface actually should be, and if you haven't committed to supporting it (e.g. because it's an externally exposed API that can't be dropped), it can be better to change your 6-month-old interface than keep one you realized wasn't great.
- jaggederest 15y agoGood tests help you change either the interface or the implementation separately. Trying to change both at once is madness, in my opinion, and almost impossible even with good tests.