< Summary

Class:Azure.ResourceManager.Storage.Models.SkuTierExtensions
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\SkuTier.Serialization.cs
Covered lines:6
Uncovered lines:3
Coverable lines:9
Total lines:28
Line coverage:66.6% (6 of 9)
Covered branches:4
Total branches:8
Branch coverage:50% (4 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ToSerialString(...)-66.67%25%
ToSkuTier(...)-66.67%75%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\SkuTier.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.Storage.Models
 11{
 12    internal static class SkuTierExtensions
 13    {
 1614        public static string ToSerialString(this SkuTier value) => value switch
 1615        {
 3216            SkuTier.Standard => "Standard",
 017            SkuTier.Premium => "Premium",
 018            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SkuTier value.")
 1619        };
 20
 21        public static SkuTier ToSkuTier(this string value)
 22        {
 608823            if (string.Equals(value, "Standard", StringComparison.InvariantCultureIgnoreCase)) return SkuTier.Standard;
 115224            if (string.Equals(value, "Premium", StringComparison.InvariantCultureIgnoreCase)) return SkuTier.Premium;
 025            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SkuTier value.");
 26        }
 27    }
 28}

Methods/Properties

ToSerialString(...)
ToSkuTier(...)