C# Class Imgur.API.Tests.Mocks.MockHttpMessageHandler

Mock HttpMessageHandler for Unit Testing HttpClient.
Inheritance: System.Net.Http.HttpMessageHandler
Datei anzeigen Open project: DamienDennehy/Imgur.API

Public Methods

Method Description
AddResponseMessage ( string url, HttpResponseMessage response ) : void
MockHttpMessageHandler ( ) : System.Collections.Generic
MockHttpMessageHandler ( string url, HttpResponseMessage response ) : System.Collections.Generic

Protected Methods

Method Description
SendAsync ( HttpRequestMessage request, CancellationToken cancellationToken ) : Task

Method Details

AddResponseMessage() public method

public AddResponseMessage ( string url, HttpResponseMessage response ) : void
url string
response System.Net.Http.HttpResponseMessage
return void

MockHttpMessageHandler() public method

public MockHttpMessageHandler ( ) : System.Collections.Generic
return System.Collections.Generic

MockHttpMessageHandler() public method

public MockHttpMessageHandler ( string url, HttpResponseMessage response ) : System.Collections.Generic
url string
response System.Net.Http.HttpResponseMessage
return System.Collections.Generic

SendAsync() protected method

protected SendAsync ( HttpRequestMessage request, CancellationToken cancellationToken ) : Task
request System.Net.Http.HttpRequestMessage
cancellationToken System.Threading.CancellationToken
return Task