< Summary

Class:Azure.ResourceManager.EventHubs.Models.ProvisioningStateDRExtensions
Assembly:Azure.ResourceManager.EventHubs
File(s):C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\ProvisioningStateDR.Serialization.cs
Covered lines:2
Uncovered lines:9
Coverable lines:11
Total lines:30
Line coverage:18.1% (2 of 11)
Covered branches:3
Total branches:10
Branch coverage:30% (3 of 10)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\ProvisioningStateDR.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.EventHubs.Models
 11{
 12    internal static class ProvisioningStateDRExtensions
 13    {
 014        public static string ToSerialString(this ProvisioningStateDR value) => value switch
 015        {
 016            ProvisioningStateDR.Accepted => "Accepted",
 017            ProvisioningStateDR.Succeeded => "Succeeded",
 018            ProvisioningStateDR.Failed => "Failed",
 019            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ProvisioningStateDR value.")
 020        };
 21
 22        public static ProvisioningStateDR ToProvisioningStateDR(this string value)
 23        {
 1210424            if (string.Equals(value, "Accepted", StringComparison.InvariantCultureIgnoreCase)) return ProvisioningStateD
 8025            if (string.Equals(value, "Succeeded", StringComparison.InvariantCultureIgnoreCase)) return ProvisioningState
 026            if (string.Equals(value, "Failed", StringComparison.InvariantCultureIgnoreCase)) return ProvisioningStateDR.
 027            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ProvisioningStateDR value.");
 28        }
 29    }
 30}