< Summary

Class:Azure.Search.Documents.Indexes.Models.EdgeNGramTokenFilterSideExtensions
Assembly:Azure.Search.Documents
File(s):C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\EdgeNGramTokenFilterSide.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%
ToEdgeNGramTokenFilterSide(...)-33.33%25%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\EdgeNGramTokenFilterSide.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.Search.Documents.Indexes.Models
 11{
 12    internal static class EdgeNGramTokenFilterSideExtensions
 13    {
 214        public static string ToSerialString(this EdgeNGramTokenFilterSide value) => value switch
 215        {
 416            EdgeNGramTokenFilterSide.Front => "front",
 017            EdgeNGramTokenFilterSide.Back => "back",
 018            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown EdgeNGramTokenFilterSide value.")
 219        };
 20
 21        public static EdgeNGramTokenFilterSide ToEdgeNGramTokenFilterSide(this string value)
 22        {
 423            if (string.Equals(value, "front", StringComparison.InvariantCultureIgnoreCase)) return EdgeNGramTokenFilterS
 024            if (string.Equals(value, "back", StringComparison.InvariantCultureIgnoreCase)) return EdgeNGramTokenFilterSi
 025            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown EdgeNGramTokenFilterSide value.");
 26        }
 27    }
 28}