< Summary

Class:Azure.ResourceManager.EventHubs.Models.ConsumerGroupListResult
Assembly:Azure.ResourceManager.EventHubs
File(s):C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\ConsumerGroupListResult.cs
C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\ConsumerGroupListResult.Serialization.cs
Covered lines:21
Uncovered lines:3
Coverable lines:24
Total lines:90
Line coverage:87.5% (21 of 24)
Covered branches:13
Total branches:14
Branch coverage:92.8% (13 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Value()-100%100%
get_NextLink()-100%100%
DeserializeConsumerGroupListResult(...)-93.75%92.86%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\ConsumerGroupListResult.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;
 9
 10namespace Azure.ResourceManager.EventHubs.Models
 11{
 12    /// <summary> The result to the List Consumer Group operation. </summary>
 13    public partial class ConsumerGroupListResult
 14    {
 15        /// <summary> Initializes a new instance of ConsumerGroupListResult. </summary>
 016        internal ConsumerGroupListResult()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ConsumerGroupListResult. </summary>
 21        /// <param name="value"> Result of the List Consumer Group operation. </param>
 22        /// <param name="nextLink"> Link to the next set of results. Not empty if Value contains incomplete list of Cons
 2023        internal ConsumerGroupListResult(IReadOnlyList<ConsumerGroup> value, string nextLink)
 24        {
 2025            Value = value;
 2026            NextLink = nextLink;
 2027        }
 28
 29        /// <summary> Result of the List Consumer Group operation. </summary>
 2030        public IReadOnlyList<ConsumerGroup> Value { get; }
 31        /// <summary> Link to the next set of results. Not empty if Value contains incomplete list of Consumer Group. </
 2032        public string NextLink { get; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\ConsumerGroupListResult.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.ResourceManager.EventHubs.Models
 13{
 14    public partial class ConsumerGroupListResult
 15    {
 16        internal static ConsumerGroupListResult DeserializeConsumerGroupListResult(JsonElement element)
 17        {
 2018            IReadOnlyList<ConsumerGroup> value = default;
 2019            string nextLink = default;
 8820            foreach (var property in element.EnumerateObject())
 21            {
 2422                if (property.NameEquals("value"))
 23                {
 2024                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 2028                    List<ConsumerGroup> array = new List<ConsumerGroup>();
 20829                    foreach (var item in property.Value.EnumerateArray())
 30                    {
 8431                        if (item.ValueKind == JsonValueKind.Null)
 32                        {
 033                            array.Add(null);
 34                        }
 35                        else
 36                        {
 8437                            array.Add(ConsumerGroup.DeserializeConsumerGroup(item));
 38                        }
 39                    }
 2040                    value = array;
 2041                    continue;
 42                }
 443                if (property.NameEquals("nextLink"))
 44                {
 445                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 449                    nextLink = property.Value.GetString();
 50                    continue;
 51                }
 52            }
 2053            return new ConsumerGroupListResult(value, nextLink);
 54        }
 55    }
 56}