The fake inner http message handler.
Наследование: System.Net.Http.DelegatingHandler
        /// <summary>
        /// Initialises a new instance of the <see cref="EnricherHttpMessageHandlerTests"/> class.
        /// </summary>
        public EnricherHttpMessageHandlerTests()
        {
            this.fakeResponse = new HttpResponseMessage(HttpStatusCode.OK)
                                    {
                                        Content =
                                            new ObjectContent(
                                            typeof(FakeModel),
                                            new FakeModel(),
                                            new JsonMediaTypeFormatter())
                                    };

            this.fakeInnerHandler = new FakeInnerHttpMessageHandler { Message = this.fakeResponse };

            this.cancellationToken = new CancellationToken(false);
        }
        public void DoesNotModifyHeaderValueIfCustomHeaderExistsInResponse()
        {
            var fakeInnerHandler = new FakeInnerHttpMessageHandler { Message = this.fakeResponsewithHeader };

            var messageInvoker =
                new HttpMessageInvoker(
                    new FakeCustomHeaderHttpMessageHandler(FakeHeaderName) { InnerHandler = fakeInnerHandler });

            var requestMessage = new HttpRequestMessage(HttpMethod.Get, "http://localhost/Fake");

            var responseMessage = messageInvoker.SendAsync(requestMessage, this.cancellationToken).Result;

            Assert.True(responseMessage.Headers.Contains(FakeHeaderName));
            Assert.Equal(FakeHeaderValue, responseMessage.Headers.GetValues(FakeHeaderName).First());
        }