<p>Multiple approaches exist to write your unit tests when using Rhino Mocks:</p>

<ul>
<li>The Standard Syntax</li>
<li>Record/Replay Syntax</li>
<li>The Fluent Syntax</li>
</ul>

<p>What is the ideal and most frictionless way?</p>

[{'answer_id': 54819, 'author': 'alastairs', 'author_id': 5296, 'author_profile': 'https://Stackoverflow.com/users/5296', 'pm_score': 0, 'selected': False, 'text': '<p>Interesting question!  My own preference is the for the reflection-based syntax (what I guess you mean by the Standard Syntax).  I would argue that this is the most frictionless, as it does not add much extra code: you reference the stubs directly on your interfaces as though they were properly implemented.  </p>\n\n<p>I do also quite like the Fluent syntax, although this is quite cumbersome.  The Record/Replay syntax is as cumbersome as the Fluent syntax (if not more so, seemingly), but less intuitive (to me at least).  I\'ve only used NMock2, so the Record/Replay syntax is a bit alien to me, whilst the Fluent syntax is quite familiar.  </p>\n\n<p>However, as <a href="https://yellowduckguy.wordpress.com/2007/10/06/rhino-mocks-v3-2-new-syntax/" rel="nofollow noreferrer">this post</a> suggests, if you prefer separating your expectations from your verifications/assertions, you should opt for the Fluent syntax.  It\'s all a matter of style and personal preference, ultimately :-)</p>\n'}, {'answer_id': 54893, 'author': 'Judah Gabriel Himango', 'author_id': 536, 'author_profile': 'https://Stackoverflow.com/users/536', 'pm_score': 1, 'selected': False, 'text': "<p>For .NET 2.0, I recommend the record/playback model. We like this because it separates clearly your expectations from your verifications.</p>\n\n<pre><code>using(mocks.Record())\n{\n    Expect.Call(foo.Bar());\n}\nusing(mocks.Playback())\n{\n    MakeItAllHappen();\n}\n</code></pre>\n\n<p>If you're using .NET 3.5 and C# 3, then I'd recommend the fluent syntax.</p>\n"}]
['https://Stackoverflow.com/questions/54709', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4872/']