< Summary

Class:Azure.ResourceManager.Compute.Models.ResourceSkuRestrictionsTypeExtensions
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceSkuRestrictionsType.Serialization.cs
Covered lines:2
Uncovered lines:7
Coverable lines:9
Total lines:28
Line coverage:22.2% (2 of 9)
Covered branches:3
Total branches:8
Branch coverage:37.5% (3 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ToSerialString(...)-0%0%
ToResourceSkuRestrictionsType(...)-66.67%75%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceSkuRestrictionsType.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 ResourceSkuRestrictionsTypeExtensions
 13    {
 014        public static string ToSerialString(this ResourceSkuRestrictionsType value) => value switch
 015        {
 016            ResourceSkuRestrictionsType.Location => "Location",
 017            ResourceSkuRestrictionsType.Zone => "Zone",
 018            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ResourceSkuRestrictionsType value.
 019        };
 20
 21        public static ResourceSkuRestrictionsType ToResourceSkuRestrictionsType(this string value)
 22        {
 2502023            if (string.Equals(value, "Location", StringComparison.InvariantCultureIgnoreCase)) return ResourceSkuRestric
 1080824            if (string.Equals(value, "Zone", StringComparison.InvariantCultureIgnoreCase)) return ResourceSkuRestriction
 025            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ResourceSkuRestrictionsType value.");
 26        }
 27    }
 28}