< Summary

Class:Azure.ResourceManager.EventHubs.Models.EncodingCaptureDescriptionExtensions
Assembly:Azure.ResourceManager.EventHubs
File(s):C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\EncodingCaptureDescription.Serialization.cs
Covered lines:5
Uncovered lines:4
Coverable lines:9
Total lines:28
Line coverage:55.5% (5 of 9)
Covered branches:2
Total branches:8
Branch coverage:25% (2 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ToSerialString(...)-66.67%25%
ToEncodingCaptureDescription(...)-33.33%25%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\EncodingCaptureDescription.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 EncodingCaptureDescriptionExtensions
 13    {
 814        public static string ToSerialString(this EncodingCaptureDescription value) => value switch
 815        {
 1616            EncodingCaptureDescription.Avro => "Avro",
 017            EncodingCaptureDescription.AvroDeflate => "AvroDeflate",
 018            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown EncodingCaptureDescription value."
 819        };
 20
 21        public static EncodingCaptureDescription ToEncodingCaptureDescription(this string value)
 22        {
 4023            if (string.Equals(value, "Avro", StringComparison.InvariantCultureIgnoreCase)) return EncodingCaptureDescrip
 024            if (string.Equals(value, "AvroDeflate", StringComparison.InvariantCultureIgnoreCase)) return EncodingCapture
 025            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown EncodingCaptureDescription value.");
 26        }
 27    }
 28}