< Summary

Class:Azure.ResourceManager.Resources.Models.ContainerConfiguration
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ContainerConfiguration.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ContainerConfiguration.Serialization.cs
Covered lines:5
Uncovered lines:13
Coverable lines:18
Total lines:72
Line coverage:27.7% (5 of 18)
Covered branches:3
Total branches:8
Branch coverage:37.5% (3 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_ContainerGroupName()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeContainerConfiguration(...)-33.33%50%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ContainerConfiguration.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.Resources.Models
 9{
 10    /// <summary> Settings to customize ACI container instance. </summary>
 11    public partial class ContainerConfiguration
 12    {
 13        /// <summary> Initializes a new instance of ContainerConfiguration. </summary>
 014        public ContainerConfiguration()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ContainerConfiguration. </summary>
 19        /// <param name="containerGroupName"> Container group name, if not specified then the name will get auto-generat
 7420        internal ContainerConfiguration(string containerGroupName)
 21        {
 7422            ContainerGroupName = containerGroupName;
 7423        }
 24
 25        /// <summary> Container group name, if not specified then the name will get auto-generated. Not specifying a &ap
 026        public string ContainerGroupName { get; set; }
 27    }
 28}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ContainerConfiguration.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.Resources.Models
 12{
 13    public partial class ContainerConfiguration : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (ContainerGroupName != null)
 19            {
 020                writer.WritePropertyName("containerGroupName");
 021                writer.WriteStringValue(ContainerGroupName);
 22            }
 023            writer.WriteEndObject();
 024        }
 25
 26        internal static ContainerConfiguration DeserializeContainerConfiguration(JsonElement element)
 27        {
 7428            string containerGroupName = default;
 029            foreach (var property in element.EnumerateObject())
 30            {
 031                if (property.NameEquals("containerGroupName"))
 32                {
 033                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 037                    containerGroupName = property.Value.GetString();
 38                    continue;
 39                }
 40            }
 7441            return new ContainerConfiguration(containerGroupName);
 42        }
 43    }
 44}