< Summary

Class:Azure.ResourceManager.Resources.Models.ResourceListResult
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ResourceListResult.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ResourceListResult.Serialization.cs
Covered lines:18
Uncovered lines:6
Coverable lines:24
Total lines:90
Line coverage:75% (18 of 24)
Covered branches:10
Total branches:14
Branch coverage:71.4% (10 of 14)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ResourceListResult.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.Resources.Models
 11{
 12    /// <summary> List of resource groups. </summary>
 13    public partial class ResourceListResult
 14    {
 15        /// <summary> Initializes a new instance of ResourceListResult. </summary>
 016        internal ResourceListResult()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ResourceListResult. </summary>
 21        /// <param name="value"> An array of resources. </param>
 22        /// <param name="nextLink"> The URL to use for getting the next set of results. </param>
 3623        internal ResourceListResult(IReadOnlyList<GenericResourceExpanded> value, string nextLink)
 24        {
 3625            Value = value;
 3626            NextLink = nextLink;
 3627        }
 28
 29        /// <summary> An array of resources. </summary>
 3630        public IReadOnlyList<GenericResourceExpanded> Value { get; }
 31        /// <summary> The URL to use for getting the next set of results. </summary>
 3632        public string NextLink { get; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ResourceListResult.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.Resources.Models
 13{
 14    public partial class ResourceListResult
 15    {
 16        internal static ResourceListResult DeserializeResourceListResult(JsonElement element)
 17        {
 3618            IReadOnlyList<GenericResourceExpanded> value = default;
 3619            string nextLink = default;
 14420            foreach (var property in element.EnumerateObject())
 21            {
 3622                if (property.NameEquals("value"))
 23                {
 3624                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 3628                    List<GenericResourceExpanded> array = new List<GenericResourceExpanded>();
 57229                    foreach (var item in property.Value.EnumerateArray())
 30                    {
 25031                        if (item.ValueKind == JsonValueKind.Null)
 32                        {
 033                            array.Add(null);
 34                        }
 35                        else
 36                        {
 25037                            array.Add(GenericResourceExpanded.DeserializeGenericResourceExpanded(item));
 38                        }
 39                    }
 3640                    value = array;
 3641                    continue;
 42                }
 043                if (property.NameEquals("nextLink"))
 44                {
 045                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 049                    nextLink = property.Value.GetString();
 50                    continue;
 51                }
 52            }
 3653            return new ResourceListResult(value, nextLink);
 54        }
 55    }
 56}