< Summary

Class:Azure.ResourceManager.Resources.Models.DeploymentModeExtensions
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentMode.Serialization.cs
Covered lines:6
Uncovered lines:3
Coverable lines:9
Total lines:28
Line coverage:66.6% (6 of 9)
Covered branches:4
Total branches:8
Branch coverage:50% (4 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ToSerialString(...)-83.33%75%
ToDeploymentMode(...)-33.33%25%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentMode.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.Resources.Models
 11{
 12    internal static class DeploymentModeExtensions
 13    {
 35214        public static string ToSerialString(this DeploymentMode value) => value switch
 35215        {
 68016            DeploymentMode.Incremental => "Incremental",
 37617            DeploymentMode.Complete => "Complete",
 018            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown DeploymentMode value.")
 35219        };
 20
 21        public static DeploymentMode ToDeploymentMode(this string value)
 22        {
 25623            if (string.Equals(value, "Incremental", StringComparison.InvariantCultureIgnoreCase)) return DeploymentMode.
 024            if (string.Equals(value, "Complete", StringComparison.InvariantCultureIgnoreCase)) return DeploymentMode.Com
 025            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown DeploymentMode value.");
 26        }
 27    }
 28}