I’m using Visual Studio unit testing framework and have the need to using a mocking framework. And I’m not sure which of the mocking frameworks NMock2, Rhino mock that I should choose. Would you please share your experience? Thanks!
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
I would strongly consider Moq as well if you’re working with C#3.5. Rhino documentation does not clearly differentiate between the number of ‘syntaxes’ that you can use, which easily leads to mix-ups in writing your tests that can lead to all kinds of errors.
After introducing myself to Rhino for the last two months, and incorporating it into our tests for a new product version we are developing, I am in the process of changing everything over to Moq. I simply cannot introduce Rhino to our developers and get success with it, the learning curve is too time intensive for very little gain. I don’t care if they understand the difference between stubs and mocks, partial or strict or full.
The simplicity and discoverability of the Moq API means all our developers can start mocking right away without caring about niggly differences. I guess it helps that our managers have the same philosophy on mocking that the creator of Moq does.