<p>I'm getting into more of a TDD workflow, and have a mix of MVC and asp.net Web Forms apps.</p>

<p>MOQ is recommended for MVC.</p>

<p>I've used Rhino for Web Forms.</p>

<p>Does anyone have a best practice for having 1 framework mock for both?</p>

[{'answer_id': 10155, 'author': 'Rory MacLeod', 'author_id': 1016, 'author_profile': 'https://Stackoverflow.com/users/1016', 'pm_score': 0, 'selected': False, 'text': "<p>I would just go ahead and use my favourite framework for both. I don't think there's any reason that I would choose one framework for web forms and another for MVC. A far bigger problem is how I would unit test my web forms pages at all, since it's notoriously hard to seperate the page from the rest of the HttpRequest stack.</p>\n\n<p>My favourite is Moq. I've also used TypeMock. It costs money, but it's really powerful - it lets you mock concrete classes and constructors, so you could potentially mock things like HttpContext or HttpRequest.</p>\n"}, {'answer_id': 10192, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': True, 'text': "<p>Rhino's latest release includes much of the sweet sweet 3.5 love that MoQ has.  I'm a fan of MoQ, so that's what I'm using.  But I also have Rhino, in case it does something that MoQ doesn't do.</p>\n\n<p>TL;DR:  MoQ it baby.</p>\n"}, {'answer_id': 10678, 'author': 'CVertex', 'author_id': 209, 'author_profile': 'https://Stackoverflow.com/users/209', 'pm_score': 1, 'selected': False, 'text': "<p>TypeMock is insanely powerful. When I <em>needed</em> to unit test a web forms app that wasn't designed for testability TypeMock saved my life.</p>\n\n<p>But when I take the time to pick an architectural pattern (MVC) or design one that allows for Mockability (you know, public virtualize state changing methods) I use Moq. It is so simple to use and so simple to teach others.</p>\n\n<p>TypeMock's record replay syntax still confuses me, but it saved me plenty of time in a tight release schedule. Moq's API is almost self explanatory which is an amazing achievement given the mock library history.</p>\n"}, {'answer_id': 33612, 'author': 'Matt Hinze', 'author_id': 2676, 'author_profile': 'https://Stackoverflow.com/users/2676', 'pm_score': 2, 'selected': False, 'text': '<p>This is sort of a silly question, but I prefer Rhino Mocks as it represents a more complete understanding of <a href="http://martinfowler.com/articles/mocksArentStubs.html" rel="nofollow noreferrer">mocks vs. stubs</a>.</p>\n\n<p>Look deep into TypeMock before committing to the price.</p>\n\n<p>Also, there is no recommended mocking framework for ASP.NET MVC.</p>\n\n<p>Finally - I\'d suggest you stick to one mocking framework in your project (and even in your team) - the differences, while not huge, can lead to confusion that is unwarranted on such a "polishing-the-rock" decision.  By that I mean the decision should not be a long one, just pick what works and get on with creating value. </p>\n'}, {'answer_id': 114173, 'author': 'RoyOsherove', 'author_id': 18426, 'author_profile': 'https://Stackoverflow.com/users/18426', 'pm_score': 0, 'selected': False, 'text': '<p>Look into Ivonna for faking HTTPContext and traditional webforms.</p>\n\n<p><a href="http://sm-art.biz/Ivonna.aspx" rel="nofollow noreferrer">http://sm-art.biz/Ivonna.aspx</a></p>\n'}]
['https://Stackoverflow.com/questions/10098', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1220/']