< Summary

Class:Azure.ResourceManager.Storage.Models.StorageAccountExpandExtensions
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\StorageAccountExpand.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%
ToStorageAccountExpand(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\StorageAccountExpand.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 StorageAccountExpandExtensions
 13    {
 414        public static string ToSerialString(this StorageAccountExpand value) => value switch
 415        {
 816            StorageAccountExpand.GeoReplicationStats => "geoReplicationStats",
 017            StorageAccountExpand.BlobRestoreStatus => "blobRestoreStatus",
 018            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown StorageAccountExpand value.")
 419        };
 20
 21        public static StorageAccountExpand ToStorageAccountExpand(this string value)
 22        {
 023            if (string.Equals(value, "geoReplicationStats", StringComparison.InvariantCultureIgnoreCase)) return Storage
 024            if (string.Equals(value, "blobRestoreStatus", StringComparison.InvariantCultureIgnoreCase)) return StorageAc
 025            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown StorageAccountExpand value.");
 26        }
 27    }
 28}