< Summary

Class:KeyVault.TestFramework.TestKeyVaultCredential
Assembly:Microsoft.Azure.KeyVault.TestFramework
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Microsoft.Azure.KeyVault\tests\TestFramework\TestKeyVaultCredential.cs
Covered lines:4
Uncovered lines:1
Coverable lines:5
Total lines:32
Line coverage:80% (4 of 5)
Covered branches:1
Total branches:2
Branch coverage:50% (1 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
ProcessHttpRequestAsync(...)-66.67%50%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Microsoft.Azure.KeyVault\tests\TestFramework\TestKeyVaultCredential.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License. See License.txt in the project root for license information.
 3// governing permissions and limitations under the License.
 4
 5using System.Net.Http;
 6using System.Threading;
 7using System.Threading.Tasks;
 8using Microsoft.Azure.KeyVault;
 9using Microsoft.Azure.Test.HttpRecorder;
 10
 11namespace KeyVault.TestFramework
 12{
 13    public class TestKeyVaultCredential : KeyVaultCredential
 14    {
 12015        public TestKeyVaultCredential(KeyVaultClient.AuthenticationCallback authenticationCallback) : base(authenticatio
 16        {
 12017        }
 18
 19        public override Task ProcessHttpRequestAsync(HttpRequestMessage request,
 20            CancellationToken cancellationToken)
 21        {
 91222            if (HttpMockServer.Mode == HttpRecorderMode.Record)
 23            {
 024                return base.ProcessHttpRequestAsync(request, cancellationToken);
 25            }
 26            else
 27            {
 182428                return Task.Run(() => { return; });
 29            }
 30        }
 31    }
 32}