Hi,
I realise that this is not a feature at the moment, I was wondering if this is planned to go in, and if so, when?
To be clear, the issue I have is that if you place a ExpectAlways or AlwaysReturn on a MockAll mock, then it doesn't work for instance mocks that are created later. I'd like for TypeMock to check if there is an expectation for a particular method in the MockAll mock if the instance mock doesn't explicitly expect it.
Basically I'm trying to do something like this:
1) Create an instance mock and stub all methods (either ExpectAlways, or AlwaysReturn with a default return value)
2) Specify particular return values for a chosen method on all instances of the same type.
3) Have subsequently created mock instances of that type inherit the return values specified in 2.
I can do 1 and 2 (by adding the expectation into any existing mock instances), but not 3. Is there any way to achieve this currently?
Cheers,
Rory.
________
buy vapormatic