Needing expectations in the set-up phase instead of in the actual test is a strong indication that something is not right. What's wrong in both these cases is that we don't actually need mocks, we just need stubs. Not using stubs is a pre-existing issue, but this is a good opportunity to fix it.
Needing expectations in the set-up phase instead of in the actual test is a strong indication that something is not right. What's wrong in both these cases is that we don't actually need mocks, we just need stubs. Not using stubs is a pre-existing issue, but this is a good opportunity to fix it.