I've tracked down the code that causes this behavior and it's pretty
deep in the system. ReplayDynamicMockState is the one making the
decision to ignore the extra call and just return the default value
but the problem is that it relies on
MethodRecordBase.GetRecordedExpectationOrNull to return Null for this
behavior.
The safest place to make a change would appear to be
ReplayDynamicMockState but this doesn't work because it needs an
expectation so it can tell it to return or throw. The problem being
that we don't an expectation since the return of a null expectation is
what triggers this behavior. There appears to be a lot of other code
that all relies on GetRecordedExpectationOrNull so changing it's
behavior seems like an unsafe idea but I don't see how the problem can
be fixed without doing so.
Look at the else statement in ReplayDynamicMockState.DoMethodCall to
get a better idea of what I mean...
Thoughts?
On Feb 17, 1:07 pm, Shane Courtrille <
shanecourtri...@gmail.com>
wrote:
> Haha I know I did.. I was just hoping someone else would have the time
> so I can spend a little bit of my time with my family.. if not.. then
> I shall follow the Ayende method of "Fix the things that bug you"
>
> On Tue, Feb 17, 2009 at 12:56 PM, Ayende Rahien <
aye...@ayende.com> wrote:
> > I think that you just vulanteered
>