I just wanted to say that I really appreciate the feedback. I know
all of our time is valuable.
I'm just arguing for the sake of argument at this point. I know how to
use your framework as intended now and still think it's completely
excellent to use. So, with that said, one more go at it...
I think I would still assert that the definition of Once is "Once and
only once". This is especially so with the presence of another method
called "AtLeastOnce".
Now, given that assertion, if someone creates a dynamic mock that
ignores unexpected calls, and then turns around and says "Once" on one
of the methods of that mock, we're left with a contradiction I think.
For that one method, did the user mean dynamic or did he/she mean
once? I personally would guess that the user meant "dynamic for
everything on the mock except the one where I was specific."
Have an excellent day and thanks again.
Rob
> > On Sun, May 18, 2008 at 10:51 PM, Rob <
rten...@gmail.com> wrote:
>
> >> I wouldn't argue with the default behavior of a dynamic mock at all.
> >> That's why we like it so much. The interesting part to me I guess is
> >> the fact that my stating "LastCall.Repeat.Once()" doesn't undo the
> >> dynamic behavior of that particular method call on the dynamic mock.
> >> If that can't happen, I think I would rather get an exception that
> >> tells me that I can't specify "Once" on a dynamic mock, than just have
> >> the test pass as if everything is working as expected.
>
> >> Not a huge deal by any means. The production code has been updated and
> >> is working like a champ now.
>
> >> On May 17, 2:08 am, "Ayende Rahien" <
aye...@ayende.com> wrote:
> >> > The key difference between dynamic and strict mocks is how they treat
> >> > unexpected method calls.In your test, the second method call is not
> >> > expected, and is ignored.- Hide quoted text -
>
> - Show quoted text -