microsoft/healthcare-shared-components
Publicmirrored from https://github.com/microsoft/healthcare-shared-componentsAvailable
src/Microsoft.Health.Client.UnitTests/TestInnerHandler.cs
25lines · modecode
| 1 | // ------------------------------------------------------------------------------------------------- |
| 2 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 3 | // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. |
| 4 | // ------------------------------------------------------------------------------------------------- |
| 5 | |
| 6 | using System.Net; |
| 7 | using System.Net.Http; |
| 8 | using System.Threading; |
| 9 | using System.Threading.Tasks; |
| 10 | |
| 11 | namespace Microsoft.Health.Client.UnitTests |
| 12 | { |
| 13 | public class TestInnerHandler : DelegatingHandler |
| 14 | { |
| 15 | protected override Task<HttpResponseMessage> SendAsync( |
| 16 | HttpRequestMessage request, |
| 17 | CancellationToken cancellationToken) |
| 18 | { |
| 19 | return Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK) |
| 20 | { |
| 21 | RequestMessage = request, |
| 22 | }); |
| 23 | } |
| 24 | } |
| 25 | } |