< Summary

Class:Azure.ResourceManager.Storage.Models.StorageSkuListResult
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\StorageSkuListResult.cs
C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\StorageSkuListResult.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_Value()-100%100%
DeserializeStorageSkuListResult(...)-90.91%90%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\StorageSkuListResult.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 SKUs operation. </summary>
 13    public partial class StorageSkuListResult
 14    {
 15        /// <summary> Initializes a new instance of StorageSkuListResult. </summary>
 016        internal StorageSkuListResult()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of StorageSkuListResult. </summary>
 21        /// <param name="value"> Get the list result of storage SKUs and their properties. </param>
 422        internal StorageSkuListResult(IReadOnlyList<SkuInformation> value)
 23        {
 424            Value = value;
 425        }
 26
 27        /// <summary> Get the list result of storage SKUs and their properties. </summary>
 428        public IReadOnlyList<SkuInformation> Value { get; }
 29    }
 30}

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\StorageSkuListResult.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 StorageSkuListResult
 15    {
 16        internal static StorageSkuListResult DeserializeStorageSkuListResult(JsonElement element)
 17        {
 418            IReadOnlyList<SkuInformation> value = default;
 1619            foreach (var property in element.EnumerateObject())
 20            {
 421                if (property.NameEquals("value"))
 22                {
 423                    if (property.Value.ValueKind == JsonValueKind.Null)
 24                    {
 25                        continue;
 26                    }
 427                    List<SkuInformation> array = new List<SkuInformation>();
 491228                    foreach (var item in property.Value.EnumerateArray())
 29                    {
 245230                        if (item.ValueKind == JsonValueKind.Null)
 31                        {
 032                            array.Add(null);
 33                        }
 34                        else
 35                        {
 245236                            array.Add(SkuInformation.DeserializeSkuInformation(item));
 37                        }
 38                    }
 439                    value = array;
 40                    continue;
 41                }
 42            }
 443            return new StorageSkuListResult(value);
 44        }
 45    }
 46}