Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
public class FakeHttpMessageHandler : HttpMessageHandler
{
public virtual HttpResponseMessage Send(HttpRequestMessage request)
{
throw new NotImplementedException("Now we can setup this method with our mocking framework");
}
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