< Summary

Class:Azure.Identity.AuthenticationAccount
Assembly:Azure.Identity
File(s):C:\Git\azure-sdk-for-net\sdk\identity\Azure.Identity\src\AuthenticationAccount.cs
Covered lines:7
Uncovered lines:1
Coverable lines:8
Total lines:25
Line coverage:87.5% (7 of 8)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
Microsoft.Identity.Client.IAccount.get_Username()-100%100%
Microsoft.Identity.Client.IAccount.get_Environment()-100%100%
Microsoft.Identity.Client.IAccount.get_HomeAccountId()-100%100%
op_Explicit(...)-100%100%
op_Explicit(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\identity\Azure.Identity\src\AuthenticationAccount.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using Microsoft.Identity.Client;
 5
 6namespace Azure.Identity
 7{   internal class AuthenticationAccount : IAccount
 8    {
 9        private AuthenticationRecord _profile;
 10
 1611        internal AuthenticationAccount(AuthenticationRecord profile)
 12        {
 1613            _profile = profile;
 1614        }
 15
 1616        string IAccount.Username => _profile.Username;
 17
 418        string IAccount.Environment => _profile.Authority;
 19
 4020        AccountId IAccount.HomeAccountId => _profile.AccountId;
 21
 1222        public static explicit operator AuthenticationAccount(AuthenticationRecord profile) => new AuthenticationAccount
 023        public static explicit operator AuthenticationRecord(AuthenticationAccount account) => account._profile;
 24    }
 25}