private void RespondWith(MandrillApi api, HttpStatusCode statusCode, string content) { var responseMessage = new HttpResponseMessage(statusCode); responseMessage.Content = new FakeHttpContent(content); var messageHandler = new FakeHttpMessageHandler(responseMessage); api.SetHttpClient(new HttpClient(messageHandler)); }
private void RespondWith(MandrillApi api, HttpStatusCode statusCode, string content) { var responseMessage = new HttpResponseMessage(statusCode); responseMessage.Content = new FakeHttpContent(content); var messageHandler = new FakeHttpMessageHandler(responseMessage); api.SetHttpClient(new HttpClient(messageHandler)); }
private void RespondWith(MandrillApi api, HttpStatusCode statusCode, string content) { var responseMessage = new HttpResponseMessage(statusCode); responseMessage.Content = new FakeHttpContent(content); var messageHandler = new FakeHttpMessageHandler(responseMessage); var httpClient = new HttpClient(messageHandler) { BaseAddress = new Uri(Configuration.BASE_SECURE_URL) }; api.SetHttpClient(httpClient); }