I\'ve got an interface which declares
Task DoSomethingAsync();
I\'m using MoqFramework for my tests:
[TestMethod()] public
You only need to add .Returns(Task.FromResult(0)); after the Callback.
.Returns(Task.FromResult(0));
Example:
mock.Setup(arg => arg.DoSomethingAsync()) .Callback(() => { }) .Returns(Task.FromResult(0));