< Summary

Class:Azure.ResourceManager.Network.Models.UsageName
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\UsageName.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\UsageName.Serialization.cs
Covered lines:17
Uncovered lines:2
Coverable lines:19
Total lines:75
Line coverage:89.4% (17 of 19)
Covered branches:10
Total branches:10
Branch coverage:100% (10 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Value()-100%100%
get_LocalizedValue()-100%100%
DeserializeUsageName(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\UsageName.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
 8namespace Azure.ResourceManager.Network.Models
 9{
 10    /// <summary> The usage names. </summary>
 11    public partial class UsageName
 12    {
 13        /// <summary> Initializes a new instance of UsageName. </summary>
 014        internal UsageName()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of UsageName. </summary>
 19        /// <param name="value"> A string describing the resource name. </param>
 20        /// <param name="localizedValue"> A localized string describing the resource name. </param>
 16821        internal UsageName(string value, string localizedValue)
 22        {
 16823            Value = value;
 16824            LocalizedValue = localizedValue;
 16825        }
 26
 27        /// <summary> A string describing the resource name. </summary>
 16828        public string Value { get; }
 29        /// <summary> A localized string describing the resource name. </summary>
 16830        public string LocalizedValue { get; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\UsageName.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.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.ResourceManager.Network.Models
 12{
 13    public partial class UsageName
 14    {
 15        internal static UsageName DeserializeUsageName(JsonElement element)
 16        {
 16817            string value = default;
 16818            string localizedValue = default;
 100819            foreach (var property in element.EnumerateObject())
 20            {
 33621                if (property.NameEquals("value"))
 22                {
 16823                    if (property.Value.ValueKind == JsonValueKind.Null)
 24                    {
 25                        continue;
 26                    }
 16827                    value = property.Value.GetString();
 16828                    continue;
 29                }
 16830                if (property.NameEquals("localizedValue"))
 31                {
 16832                    if (property.Value.ValueKind == JsonValueKind.Null)
 33                    {
 34                        continue;
 35                    }
 16836                    localizedValue = property.Value.GetString();
 37                    continue;
 38                }
 39            }
 16840            return new UsageName(value, localizedValue);
 41        }
 42    }
 43}