Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rhino Mocks step-by-step tutorials

Tags:

I realise that there exist some posts such as this one which have asked the same question. However, the links on the suggested page do not work (it simply takes me back to the blog homepage).

I'm looking for a tutorial which does not have any assumed prior Rhino Mocks knowledge.

I need a step-by-step guide which explains the basics (stubs vs. mocks vs. expect.call), how the Record(), ReplayAll(), VerifyAll(), when/why you use Repeat.Any() etc., work.

I have a rough understanding after reading some of the documentation (which I found some articles to be useful, but most to be confusing at best), but I need some more examples with detailed explanations on how to use Rhino Mocks.

like image 386
user1173691 Avatar asked Feb 21 '12 06:02

user1173691


People also ask

What is Rhino Mocks?

Rhino Mocks will generate fake objects to replace the dependencies that you have, and then allow you to tell them, at runtime, how to behave. This functionality is very powerful, and it means that you can tell your fake objects, for each test, how to behave.

Which is a valid mock type using Rhino?

Rhino. Mocks supports three basic types of mock objects: Strict Mock. A strict mock requires you to provide alternate implementations for each method/property that is used on the mock.


1 Answers

I think the best links, which are both up to date, and starting from the basics are:

  1. Getting Started with Rhino Mocks (AAA)
  2. Using Rhino.Mocks - quick guide to generating mocks and stubs
like image 143
Amittai Shapira Avatar answered Dec 04 '22 06:12

Amittai Shapira