title: Unit test delegate action is called
body: <p>I have a Dictionary that I am using to avoid writing big if statements. It maps an enum to an action. It looks like this:</p>
  
  <pre><code> var decisionMapper = new Dictionary&lt;int, Action&gt;
                               {
                                   {
                                       (int) ReviewStepType.StandardLetter,
                                       () =&gt;  
                             caseDecisionService.ProcessSendStandardLetter(aCase)
                                       },
                                   {
                                       (int) ReviewStepType.LetterWithComment,
                                       () =&gt; 
                            caseDecisionService.ProcessSendStandardLetter(aCase)
                                       },
                                   {
                                       (int) ReviewStepType.BespokeLetter,
                                       () =&gt;              
                            caseDecisionService.ProcessSendBespokeLetter(aCase)
  
                                       },
                                   {
                                       (int) ReviewStepType.AssignToCaseManager,
                                       () =&gt; 
                            caseDecisionService.ProcessContinueAsCase(aCase)
                                       },
                               };
  </code></pre>
  
  <p>then I call it like this in my method:</p>
  
  <pre><code>     decisionMapper[(int) reviewDecisionRequest.ReviewStepType]();
  </code></pre>
  
  <p>My question is <strong>how can I unit test these mappings?</strong> 
  (I am using Nunit and c# 4.0)</p>
  
  <p>How can I assert that when I call my decisionMapper - that 1 is equal to the call -caseDecisionService.ProcessSendStandardLetter(aCase).</p>
  
  <p>Thanks very much.</p>