microsoft/healthcare-shared-components

Public

mirrored from https://github.com/microsoft/healthcare-shared-componentsAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
main

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/Microsoft.Health.Client.UnitTests/TestInnerHandler.cs

27lines · 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
6using System.Diagnostics.CodeAnalysis;
7using System.Net;
8using System.Net.Http;
9using System.Threading;
10using System.Threading.Tasks;
11
12namespace Microsoft.Health.Client.UnitTests;
13
14internal sealed class TestInnerHandler : DelegatingHandler
15{
16 [SuppressMessage("Reliability", "CA2000:Dispose objects before losing scope", Justification = "Caller is responsible for disposal.")]
17 protected override Task<HttpResponseMessage> SendAsync(
18 HttpRequestMessage request,
19 CancellationToken cancellationToken)
20 {
21 return Task.FromResult(
22 new HttpResponseMessage(HttpStatusCode.OK)
23 {
24 RequestMessage = request,
25 });
26 }
27}
28