Description
When you do a lot of tests with different dependencies it would be great if you could do the following:
Define a default behaviour (e.g.)
mockA.Expect().Function1().AnyTimes().Return(1)
mockA.Expect().Function2().AnyTimes().Return(2)
mockB.Expect().Function1().AnyTimes().Return(1)
mockB.Expect().Function2().AnyTimes().Return(2)
And most of the time in a single test you want to test a behaviour of your component if one of the default functions return something else (e.g. an error)
Therefore it would be great to override an expectation with a new one (or at least to clear expectations for a function)
So you could define a default behaviour of all functions (e.g. success case) and be able to override single functions that should behave different in specific tests.
Or is there a best practive for this?