Let's have the following class and unit test:
public delegate Task<int> SomeDelegate();
private async Task<int> DoSomeStuff()
{
await Task.Delay(100);
return 1;
}
}
// Assert
Mock.Assert(next);
Assert.AreEqual(3, sum);
}
JustMock public API lacks of convenient way to assert that particular task has been awaited. Potential workaround involves some "insider knowledge" that awaiting a Task internally results in a calls to some of its members.