< Summary

Class:Azure.ResourceManager.KeyVault.Models.SkuNameExtensions
Assembly:Azure.ResourceManager.KeyVault
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\SkuName.Serialization.cs
Covered lines:7
Uncovered lines:2
Coverable lines:9
Total lines:28
Line coverage:77.7% (7 of 9)
Covered branches:6
Total branches:8
Branch coverage:75% (6 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ToSerialString(...)-83.33%75%
ToSkuName(...)-66.67%75%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\SkuName.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.KeyVault.Models
 11{
 12    internal static class SkuNameExtensions
 13    {
 10414        public static string ToSerialString(this SkuName value) => value switch
 10415        {
 20016            SkuName.Standard => "standard",
 11217            SkuName.Premium => "premium",
 018            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SkuName value.")
 10419        };
 20
 21        public static SkuName ToSkuName(this string value)
 22        {
 14423            if (string.Equals(value, "standard", StringComparison.InvariantCultureIgnoreCase)) return SkuName.Standard;
 1624            if (string.Equals(value, "premium", StringComparison.InvariantCultureIgnoreCase)) return SkuName.Premium;
 025            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SkuName value.");
 26        }
 27    }
 28}

Methods/Properties

ToSerialString(...)
ToSkuName(...)