< Summary

Class:Azure.Analytics.Synapse.AccessControl.Models.RolesListResponse
Assembly:Azure.Analytics.Synapse.AccessControl
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.AccessControl\src\Generated\Models\RolesListResponse.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.AccessControl\src\Generated\Models\RolesListResponse.Serialization.cs
Covered lines:16
Uncovered lines:7
Coverable lines:23
Total lines:85
Line coverage:69.5% (16 of 23)
Covered branches:6
Total branches:10
Branch coverage:60% (6 of 10)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.AccessControl\src\Generated\Models\RolesListResponse.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;
 9using System.Collections.Generic;
 10using System.Linq;
 11
 12namespace Azure.Analytics.Synapse.AccessControl.Models
 13{
 14    /// <summary> A list of Synapse roles available. </summary>
 15    public partial class RolesListResponse
 16    {
 17        /// <summary> Initializes a new instance of RolesListResponse. </summary>
 18        /// <param name="value"> List of Synapse roles. </param>
 19        /// <exception cref="ArgumentNullException"> <paramref name="value"/> is null. </exception>
 020        internal RolesListResponse(IEnumerable<SynapseRole> value)
 21        {
 022            if (value == null)
 23            {
 024                throw new ArgumentNullException(nameof(value));
 25            }
 26
 027            Value = value.ToList();
 028        }
 29
 30        /// <summary> Initializes a new instance of RolesListResponse. </summary>
 31        /// <param name="value"> List of Synapse roles. </param>
 32        /// <param name="nextLink"> The link to the next page of results, if any remaining results exist. </param>
 833        internal RolesListResponse(IReadOnlyList<SynapseRole> value, string nextLink)
 34        {
 835            Value = value;
 836            NextLink = nextLink;
 837        }
 38
 39        /// <summary> List of Synapse roles. </summary>
 840        public IReadOnlyList<SynapseRole> Value { get; }
 41        /// <summary> The link to the next page of results, if any remaining results exist. </summary>
 842        public string NextLink { get; }
 43    }
 44}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.AccessControl\src\Generated\Models\RolesListResponse.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.Analytics.Synapse.AccessControl.Models
 13{
 14    public partial class RolesListResponse
 15    {
 16        internal static RolesListResponse DeserializeRolesListResponse(JsonElement element)
 17        {
 818            IReadOnlyList<SynapseRole> value = default;
 819            Optional<string> nextLink = default;
 3220            foreach (var property in element.EnumerateObject())
 21            {
 822                if (property.NameEquals("value"))
 23                {
 824                    List<SynapseRole> array = new List<SynapseRole>();
 6425                    foreach (var item in property.Value.EnumerateArray())
 26                    {
 2427                        array.Add(SynapseRole.DeserializeSynapseRole(item));
 28                    }
 829                    value = array;
 830                    continue;
 31                }
 032                if (property.NameEquals("nextLink"))
 33                {
 034                    nextLink = property.Value.GetString();
 35                    continue;
 36                }
 37            }
 838            return new RolesListResponse(value, nextLink.Value);
 39        }
 40    }
 41}