title: Invoking Actions from Moq
body: <p>I've got a service with a method that takes two <code>Action</code>s, one for success and one for failure. Each <code>Action</code> takes a Result parameter that contains additional information...</p>
  
  <pre><code>void AuthoriseUser(AuthDetails loginDetails, 
    Action&lt;AuthResult&gt; onSuccess, 
    Action&lt;AuthResult&gt; onFailure);
  </code></pre>
  
  <p>I'm writing a unit test for a class that is dependant on that service, and I want to test that this class does the correct things in the <code>onSuccess(...)</code> and <code>onFailure(...)</code> callbacks. These are either private or anonymous methods, so how do I setup the mocked service to call either Action?</p>