What are the differences between mocks and stubs on Rhino Mocks?

As per this

… Put simply there is a difference between Mock and Stub objects
and RhinoMocks recognizes that allowing us to write tests that better
state their purpose.

Mock objects are used to define expectations i.e: In this scenario I
expect method A() to be called with such and such parameters. Mocks
record and verify such expectations.

Stubs, on the other hand have a different purpose: they do not record
or verify expectations, but rather allow us to “replace” the behavior,
state of the “fake”object in order to utilize a test scenario …

Leave a Comment