< Summary

Class:Azure.ResourceManager.Storage.Models.ProvisioningStateExtensions
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\ProvisioningState.Serialization.cs
Covered lines:1
Uncovered lines:10
Coverable lines:11
Total lines:30
Line coverage:9% (1 of 11)
Covered branches:3
Total branches:10
Branch coverage:30% (3 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ToSerialString(...)-0%0%
ToProvisioningState(...)-25%50%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\ProvisioningState.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 ProvisioningStateExtensions
 13    {
 014        public static string ToSerialString(this ProvisioningState value) => value switch
 015        {
 016            ProvisioningState.Creating => "Creating",
 017            ProvisioningState.ResolvingDNS => "ResolvingDNS",
 018            ProvisioningState.Succeeded => "Succeeded",
 019            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ProvisioningState value.")
 020        };
 21
 22        public static ProvisioningState ToProvisioningState(this string value)
 23        {
 024            if (string.Equals(value, "Creating", StringComparison.InvariantCultureIgnoreCase)) return ProvisioningState.
 025            if (string.Equals(value, "ResolvingDNS", StringComparison.InvariantCultureIgnoreCase)) return ProvisioningSt
 167226            if (string.Equals(value, "Succeeded", StringComparison.InvariantCultureIgnoreCase)) return ProvisioningState
 027            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ProvisioningState value.");
 28        }
 29    }
 30}