< Summary

Class:Azure.ResourceManager.Storage.Models.HttpProtocolExtensions
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\HttpProtocol.Serialization.cs
Covered lines:4
Uncovered lines:5
Coverable lines:9
Total lines:28
Line coverage:44.4% (4 of 9)
Covered branches:1
Total branches:8
Branch coverage:12.5% (1 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ToSerialString(...)-66.67%25%
ToHttpProtocol(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\HttpProtocol.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 HttpProtocolExtensions
 13    {
 814        public static string ToSerialString(this HttpProtocol value) => value switch
 815        {
 1616            HttpProtocol.HttpsHttp => "https,http",
 017            HttpProtocol.Https => "https",
 018            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown HttpProtocol value.")
 819        };
 20
 21        public static HttpProtocol ToHttpProtocol(this string value)
 22        {
 023            if (string.Equals(value, "https,http", StringComparison.InvariantCultureIgnoreCase)) return HttpProtocol.Htt
 024            if (string.Equals(value, "https", StringComparison.InvariantCultureIgnoreCase)) return HttpProtocol.Https;
 025            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown HttpProtocol value.");
 26        }
 27    }
 28}