I am testing a method for a service that makes a Web API call. Using a normal HttpClient works fine for unit tests if I also run the web service (l
API
HttpClient
Recommend @Stuart Grassie's answer above.
var moqCredentialMananger = new Mock(); moqCredentialMananger .Setup(x => x.GetCredentialsAsync(It.IsAny())) .ReturnsAsync(new Credentials() { .. .. .. });