< Summary

Class:Azure.ResourceManager.Storage.Models.StorageAccountListResult
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\StorageAccountListResult.cs
C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\StorageAccountListResult.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%
DeserializeStorageAccountListResult(...)-75%71.43%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\StorageAccountListResult.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.Storage.Models
 11{
 12    /// <summary> The response from the List Storage Accounts operation. </summary>
 13    public partial class StorageAccountListResult
 14    {
 15        /// <summary> Initializes a new instance of StorageAccountListResult. </summary>
 016        internal StorageAccountListResult()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of StorageAccountListResult. </summary>
 21        /// <param name="value"> Gets the list of storage accounts and their properties. </param>
 22        /// <param name="nextLink"> Request URL that can be used to query next page of storage accounts. Returned when t
 1623        internal StorageAccountListResult(IReadOnlyList<StorageAccount> value, string nextLink)
 24        {
 1625            Value = value;
 1626            NextLink = nextLink;
 1627        }
 28
 29        /// <summary> Gets the list of storage accounts and their properties. </summary>
 1630        public IReadOnlyList<StorageAccount> Value { get; }
 31        /// <summary> Request URL that can be used to query next page of storage accounts. Returned when total number of
 432        public string NextLink { get; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\StorageAccountListResult.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.Storage.Models
 13{
 14    public partial class StorageAccountListResult
 15    {
 16        internal static StorageAccountListResult DeserializeStorageAccountListResult(JsonElement element)
 17        {
 1618            IReadOnlyList<StorageAccount> value = default;
 1619            string nextLink = default;
 6420            foreach (var property in element.EnumerateObject())
 21            {
 1622                if (property.NameEquals("value"))
 23                {
 1624                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 1628                    List<StorageAccount> array = new List<StorageAccount>();
 77629                    foreach (var item in property.Value.EnumerateArray())
 30                    {
 37231                        if (item.ValueKind == JsonValueKind.Null)
 32                        {
 033                            array.Add(null);
 34                        }
 35                        else
 36                        {
 37237                            array.Add(StorageAccount.DeserializeStorageAccount(item));
 38                        }
 39                    }
 1640                    value = array;
 1641                    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            }
 1653            return new StorageAccountListResult(value, nextLink);
 54        }
 55    }
 56}