title: Moq returning an Action from a void method
body: <p>I have a method that returns a long number to an lambda which is used after as shown below.</p>
  
  <pre><code>classA.GetNum((num) =&gt;
          {
              numTwo = num;
              DispatcherHelper.CheckBeginInvokeOnUI(() =&gt;
              {
                  NumberIs = num;
              });
          });
  </code></pre>
  
  <p>and I'm trying to Moq the return from the action here ;</p>
  
  <pre><code>void GetNum(Action&lt;long&gt; num);
  </code></pre>
  
  <p>I've tried this so far, but wasn't successful and haven't been able to find any other ways online of moqing a simple action like this.</p>
  
  <pre><code>mock.Setup(x =&gt; x.GetNum(It.IsAny&lt;Action&lt;long&gt;&gt;()))
              .Callback(() =&gt; 255);
  </code></pre>