< Summary

Class:Azure.ResourceManager.Storage.Models.StorageAccountListKeysResult
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\StorageAccountListKeysResult.cs
C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\StorageAccountListKeysResult.Serialization.cs
Covered lines:14
Uncovered lines:3
Coverable lines:17
Total lines:76
Line coverage:82.3% (14 of 17)
Covered branches:9
Total branches:10
Branch coverage:90% (9 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Keys()-100%100%
DeserializeStorageAccountListKeysResult(...)-90.91%90%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\StorageAccountListKeysResult.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 ListKeys operation. </summary>
 13    public partial class StorageAccountListKeysResult
 14    {
 15        /// <summary> Initializes a new instance of StorageAccountListKeysResult. </summary>
 016        internal StorageAccountListKeysResult()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of StorageAccountListKeysResult. </summary>
 21        /// <param name="keys"> Gets the list of storage account keys and their properties for the specified storage acc
 1222        internal StorageAccountListKeysResult(IReadOnlyList<StorageAccountKey> keys)
 23        {
 1224            Keys = keys;
 1225        }
 26
 27        /// <summary> Gets the list of storage account keys and their properties for the specified storage account. </su
 1628        public IReadOnlyList<StorageAccountKey> Keys { get; }
 29    }
 30}

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\StorageAccountListKeysResult.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 StorageAccountListKeysResult
 15    {
 16        internal static StorageAccountListKeysResult DeserializeStorageAccountListKeysResult(JsonElement element)
 17        {
 1218            IReadOnlyList<StorageAccountKey> keys = default;
 4819            foreach (var property in element.EnumerateObject())
 20            {
 1221                if (property.NameEquals("keys"))
 22                {
 1223                    if (property.Value.ValueKind == JsonValueKind.Null)
 24                    {
 25                        continue;
 26                    }
 1227                    List<StorageAccountKey> array = new List<StorageAccountKey>();
 7228                    foreach (var item in property.Value.EnumerateArray())
 29                    {
 2430                        if (item.ValueKind == JsonValueKind.Null)
 31                        {
 032                            array.Add(null);
 33                        }
 34                        else
 35                        {
 2436                            array.Add(StorageAccountKey.DeserializeStorageAccountKey(item));
 37                        }
 38                    }
 1239                    keys = array;
 40                    continue;
 41                }
 42            }
 1243            return new StorageAccountListKeysResult(keys);
 44        }
 45    }
 46}