title: How can I tell Moq to return a Task?
body: <p>I've got an interface which declares</p>
  
  <pre><code>Task DoSomethingAsync();
  </code></pre>
  
  <p>I'm using MoqFramework for my tests:</p>
  
  <pre><code>[TestMethod()]
  public async Task MyAsyncTest()
  {
     Mock&lt;ISomeInterface&gt; mock = new Mock&lt;ISomeInterface&gt;();
     mock.Setup(arg =&gt; arg.DoSomethingAsync()).Callback(() =&gt; { &lt;my code here&gt; });
     ...
  }
  </code></pre>
  
  <p>Then in my test I execute the code which invokes <code>await DoSomethingAsync()</code>. And the test just fails on that line. What am I doing wrong?</p>