< Summary

Class:Azure.Security.KeyVault.Administration.Models.RoleAssignmentListResult
Assembly:Azure.Security.KeyVault.Administration
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Administration\src\Generated\Models\RoleAssignmentListResult.cs
C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Administration\src\Generated\Models\RoleAssignmentListResult.Serialization.cs
Covered lines:16
Uncovered lines:5
Coverable lines:21
Total lines:77
Line coverage:76.1% (16 of 21)
Covered branches:6
Total branches:8
Branch coverage:75% (6 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Value()-100%100%
get_NextLink()-100%100%
DeserializeRoleAssignmentListResult(...)-83.33%75%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Administration\src\Generated\Models\RoleAssignmentListResult.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System.Collections.Generic;
 9using Azure.Core;
 10
 11namespace Azure.Security.KeyVault.Administration.Models
 12{
 13    /// <summary> Role assignment list operation result. </summary>
 14    internal partial class RoleAssignmentListResult
 15    {
 16        /// <summary> Initializes a new instance of RoleAssignmentListResult. </summary>
 017        internal RoleAssignmentListResult()
 18        {
 019            Value = new ChangeTrackingList<RoleAssignment>();
 020        }
 21
 22        /// <summary> Initializes a new instance of RoleAssignmentListResult. </summary>
 23        /// <param name="value"> Role assignment list. </param>
 24        /// <param name="nextLink"> The URL to use for getting the next set of results. </param>
 625        internal RoleAssignmentListResult(IReadOnlyList<RoleAssignment> value, string nextLink)
 26        {
 627            Value = value;
 628            NextLink = nextLink;
 629        }
 30
 31        /// <summary> Role assignment list. </summary>
 632        public IReadOnlyList<RoleAssignment> Value { get; }
 33        /// <summary> The URL to use for getting the next set of results. </summary>
 634        public string NextLink { get; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Administration\src\Generated\Models\RoleAssignmentListResult.Serialization.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.Security.KeyVault.Administration.Models
 13{
 14    internal partial class RoleAssignmentListResult
 15    {
 16        internal static RoleAssignmentListResult DeserializeRoleAssignmentListResult(JsonElement element)
 17        {
 618            Optional<IReadOnlyList<RoleAssignment>> value = default;
 619            Optional<string> nextLink = default;
 2420            foreach (var property in element.EnumerateObject())
 21            {
 622                if (property.NameEquals("value"))
 23                {
 624                    List<RoleAssignment> array = new List<RoleAssignment>();
 13225                    foreach (var item in property.Value.EnumerateArray())
 26                    {
 6027                        array.Add(RoleAssignment.DeserializeRoleAssignment(item));
 28                    }
 629                    value = array;
 630                    continue;
 31                }
 032                if (property.NameEquals("nextLink"))
 33                {
 034                    nextLink = property.Value.GetString();
 35                    continue;
 36                }
 37            }
 638            return new RoleAssignmentListResult(Optional.ToList(value), nextLink.Value);
 39        }
 40    }
 41}