title: Moq. Execute Action given as a parameter
body: <p>How to mock the following method:</p>
  
  <pre><code>public class TimeService : ITimeService
  {
      public void SetDelyEvent(int interval, bool reset,  Action action)
      {
          var timer = new Timer {Interval = interval, AutoReset = reset};
          timer.Elapsed += (sender, args) =&gt; action();
          timer.Start();
      }
  }
  </code></pre>
  
  <p>I want to call the given ACTION.</p>
  
  <pre><code>var stub = new Mock&lt;ITimeService&gt;();
  stub .Setup(m =&gt; m.SetDelyEvent(100, false, ACTION));
  </code></pre>