I have the following method in a service but I'm failing to call it in my unit test. The method uses the async/ await
code but also (and which I think is causing me the problem) has the name of the method with a dot notation which I'm not sure what that does to be honest? See my example below
Implementation
async Task<IEnumerable<ISomething>> IMyService.MyMethodToTest(string bla)
{
...
}
Unit test
[Fact]
public void Test_My_Method()
{
var service = new MyService(...);
var result = await service.MyMethodToTest(""); // This is not available ?
}
Update
Have tried the suggestions but it does not compile with the following error message
await operator can only be used with an async method.