< Summary

Class:Azure.ResourceManager.AppConfiguration.Models.Sku
Assembly:Azure.ResourceManager.AppConfiguration
File(s):C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\Sku.cs
C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\Sku.Serialization.cs
Covered lines:15
Uncovered lines:1
Coverable lines:16
Total lines:67
Line coverage:93.7% (15 of 16)
Covered branches:5
Total branches:6
Branch coverage:83.3% (5 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-80%50%
get_Name()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-100%100%
DeserializeSku(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\Sku.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.AppConfiguration.Models
 11{
 12    /// <summary> Describes a configuration store SKU. </summary>
 13    public partial class Sku
 14    {
 15        /// <summary> Initializes a new instance of Sku. </summary>
 16        /// <param name="name"> The SKU name of the configuration store. </param>
 3617        public Sku(string name)
 18        {
 3619            if (name == null)
 20            {
 021                throw new ArgumentNullException(nameof(name));
 22            }
 23
 3624            Name = name;
 3625        }
 26
 27        /// <summary> The SKU name of the configuration store. </summary>
 6028        public string Name { get; set; }
 29    }
 30}

C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\Sku.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.AppConfiguration.Models
 12{
 13    public partial class Sku : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 2417            writer.WriteStartObject();
 2418            writer.WritePropertyName("name");
 2419            writer.WriteStringValue(Name);
 2420            writer.WriteEndObject();
 2421        }
 22
 23        internal static Sku DeserializeSku(JsonElement element)
 24        {
 2425            string name = default;
 9626            foreach (var property in element.EnumerateObject())
 27            {
 2428                if (property.NameEquals("name"))
 29                {
 2430                    name = property.Value.GetString();
 31                    continue;
 32                }
 33            }
 2434            return new Sku(name);
 35        }
 36    }
 37}