Last active
January 31, 2018 13:51
-
-
Save alieniasty/7d2a55cfb7d2b43b0a155c954a1a2ea9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FakeHttpMessageHandler : HttpMessageHandler | |
{ | |
public virtual HttpResponseMessage Send(HttpRequestMessage request) | |
{ | |
throw new NotImplementedException("Implement this method through Moq Setup method inside your tests."); | |
} | |
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) | |
{ | |
return Task.FromResult(Send(request)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment