title: Usage of Moq When(Func<bool>) method
body: <p>I can't find an example of the usage of the When method in Moq</p>
  
  <pre><code>When(Func&lt;bool&gt; condition);
  </code></pre>
  
  <p>What is the purpose/usage of the method? Please give a code sample demonstrating a scenario where it would be useful.</p>