6 ms·
The same "final state" of a fake can potentially be achieved by many different patterns of interaction between the system under test and the fake. We don't rea
by danidiaz 6y ago
The same "final state" of a fake can potentially be achieved by many different patterns of interaction between the system under test and the fake.
We don't really care about those patterns of interaction as long as they end up doing the right thing: allowing the SUT to affect his "outside world" as intended.
Making assertions about the exact pattern of interaction (that is: using mocks) is too high granularity, and will make the tests break on valid refactorings. Because we don't care about the pattern itself—it's just an implementation detail—but about what it achieves.