Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6698095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:32:13+00:00 2026-05-26T06:32:13+00:00

As I am using RhinoMocks version 3.6 and as I am not using Record-Replay

  • 0

As I am using RhinoMocks version 3.6 and as I am not using Record-Replay and as I do not call Verify methods for asserting on mocks;

Can you explain what is the difference between very simply?

MockRepository.GenerateMock()
MockRepository.GeneratePartialMock()
MockRepository.GenerateStrictMock()

Note: I use .GenerateMock all the time to create my mocks and I assert method calls by providing arguments expectation already.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:32:14+00:00Added an answer on May 26, 2026 at 6:32 am

    The differences are explained in this article

    If you create no expectations on a StrictMock, and a method gets called on the mock, an exception will be thrown.

    If you create no expectations on a PartialMock, and a method gets called on the mock, nothing special happens. If that mock derives from a base class, the call bleeds through to the existing base implementation.

    There is also something called a DynamicMock. If you create no expectations on a DynamicMock, and a method gets called on the mock, a stub method is called. If there was a return value, a default value (e.g. null or 0) is returned.

    GenerateMock I believe creates a DynamicMock.

    Ayende chose this default because he recommends an ideal of only using DynamicMock and Stub. StrictMock creates brittle tests, and usually violates the concept of only verifying one behavior per test.

    See this article: http://ayende.com/wiki/Rhino%20Mocks%203.5.ashx#CreateMockisdeprecated,replacedbyStrictMockTheuseofStrictMockisdiscouraged

    I’ve also seen him say that it is useful to start with strict mocks, and work your tests back down to dynamic mocks/stubs once you’re comfortable with how your code-under-test is behaving. No link for that tho 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Rhino Mocks and I'm not sure how to mock a call
Could someone explain why both tests using the latest versions of Moq and Rhino.Mocks
Using RhinoMocks, I have a catch-22 situation: I want to verify that a method
Using RhinoMocks - can I fetch the parameters of a called function? I mean;
Using RhinoMocks - how can I say whenever some function is called from now
Quick Info: I'm using C# 4.0 and RhinoMocks (with AAA) I'll explain with some
I started using MVC3 and Rhino mocks. Can someone provide me an example to
How can I raise an event from a mock/stub using Rhino Mocks? I've found
How do I check if Create was not called without using the Rhino Mocks
I've been using RhinoMocks lately but I keep running into an issue. If I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.