< Summary

Class:Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetSkuScaleTypeExtensions
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetSkuScaleType.Serialization.cs
Covered lines:1
Uncovered lines:8
Coverable lines:9
Total lines:28
Line coverage:11.1% (1 of 9)
Covered branches:1
Total branches:8
Branch coverage:12.5% (1 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ToSerialString(...)-0%0%
ToVirtualMachineScaleSetSkuScaleType(...)-33.33%25%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetSkuScaleType.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;
 9
 10namespace Azure.ResourceManager.Compute.Models
 11{
 12    internal static class VirtualMachineScaleSetSkuScaleTypeExtensions
 13    {
 014        public static string ToSerialString(this VirtualMachineScaleSetSkuScaleType value) => value switch
 015        {
 016            VirtualMachineScaleSetSkuScaleType.Automatic => "Automatic",
 017            VirtualMachineScaleSetSkuScaleType.None => "None",
 018            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown VirtualMachineScaleSetSkuScaleType
 019        };
 20
 21        public static VirtualMachineScaleSetSkuScaleType ToVirtualMachineScaleSetSkuScaleType(this string value)
 22        {
 431223            if (string.Equals(value, "Automatic", StringComparison.InvariantCultureIgnoreCase)) return VirtualMachineSca
 024            if (string.Equals(value, "None", StringComparison.InvariantCultureIgnoreCase)) return VirtualMachineScaleSet
 025            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown VirtualMachineScaleSetSkuScaleType valu
 26        }
 27    }
 28}