mock async function c# code example
Example 1: mock async method c# reutrnd
mock.Setup(arg=>arg.DoSomethingAsync())
.ReturnsAsync(someValue);
Example 2: mock async method c# reutrnd
mock.Setup(arg=>arg.DoSomethingAsync())
.Returns(Task.FromResult(someValue));