Rhino Mocks Record Playback syntax?

This test will fail because there is no expectation that Bar() would be called, but it was called.

This test will fail because there is no expectation that Bar() would be called, but it was called. To answer your question, yes, it is because you have a strict mock. If you change to a DynamicMock, it will ignore everything except the expectations that you actually set.

I would highly recommend using DynamicMocks wherever possible, as StrictMocks are actually quite brittle and tend to end up being a lot of hassle. As for Record/Replay, it is not automatically in Record mode if you're using a concrete MockRepository. It's just the nature of the StrictMock that looks for anything being called that was outside of expectations, no matter when.

Thanks for the help. I now understand. – qzrlsd May 24 '09 at 11:30.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions