< Summary

Class:Azure.ResourceManager.Compute.Models.VirtualMachineSizeListResult
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineSizeListResult.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineSizeListResult.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%
DeserializeVirtualMachineSizeListResult(...)-90.91%90%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineSizeListResult.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.Compute.Models
 11{
 12    /// <summary> The List Virtual Machine operation response. </summary>
 13    public partial class VirtualMachineSizeListResult
 14    {
 15        /// <summary> Initializes a new instance of VirtualMachineSizeListResult. </summary>
 016        internal VirtualMachineSizeListResult()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of VirtualMachineSizeListResult. </summary>
 21        /// <param name="value"> The list of virtual machine sizes. </param>
 5222        internal VirtualMachineSizeListResult(IReadOnlyList<VirtualMachineSize> value)
 23        {
 5224            Value = value;
 5225        }
 26
 27        /// <summary> The list of virtual machine sizes. </summary>
 5228        public IReadOnlyList<VirtualMachineSize> Value { get; }
 29    }
 30}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineSizeListResult.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.Compute.Models
 13{
 14    public partial class VirtualMachineSizeListResult
 15    {
 16        internal static VirtualMachineSizeListResult DeserializeVirtualMachineSizeListResult(JsonElement element)
 17        {
 5218            IReadOnlyList<VirtualMachineSize> value = default;
 20819            foreach (var property in element.EnumerateObject())
 20            {
 5221                if (property.NameEquals("value"))
 22                {
 5223                    if (property.Value.ValueKind == JsonValueKind.Null)
 24                    {
 25                        continue;
 26                    }
 5227                    List<VirtualMachineSize> array = new List<VirtualMachineSize>();
 2494028                    foreach (var item in property.Value.EnumerateArray())
 29                    {
 1241830                        if (item.ValueKind == JsonValueKind.Null)
 31                        {
 032                            array.Add(null);
 33                        }
 34                        else
 35                        {
 1241836                            array.Add(VirtualMachineSize.DeserializeVirtualMachineSize(item));
 37                        }
 38                    }
 5239                    value = array;
 40                    continue;
 41                }
 42            }
 5243            return new VirtualMachineSizeListResult(value);
 44        }
 45    }
 46}