< Summary

Class:Azure.ResourceManager.Resources.Models.ResourceGroupProperties
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ResourceGroupProperties.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ResourceGroupProperties.Serialization.cs
Covered lines:10
Uncovered lines:8
Coverable lines:18
Total lines:72
Line coverage:55.5% (10 of 18)
Covered branches:6
Total branches:8
Branch coverage:75% (6 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_ProvisioningState()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeResourceGroupProperties(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ResourceGroupProperties.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> The resource group properties. </summary>
 11    public partial class ResourceGroupProperties
 12    {
 13        /// <summary> Initializes a new instance of ResourceGroupProperties. </summary>
 014        public ResourceGroupProperties()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ResourceGroupProperties. </summary>
 19        /// <param name="provisioningState"> The provisioning state. </param>
 50420        internal ResourceGroupProperties(string provisioningState)
 21        {
 50422            ProvisioningState = provisioningState;
 50423        }
 24
 25        /// <summary> The provisioning state. </summary>
 2026        public string ProvisioningState { get; }
 27    }
 28}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ResourceGroupProperties.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 ResourceGroupProperties : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (ProvisioningState != null)
 19            {
 020                writer.WritePropertyName("provisioningState");
 021                writer.WriteStringValue(ProvisioningState);
 22            }
 023            writer.WriteEndObject();
 024        }
 25
 26        internal static ResourceGroupProperties DeserializeResourceGroupProperties(JsonElement element)
 27        {
 50428            string provisioningState = default;
 201629            foreach (var property in element.EnumerateObject())
 30            {
 50431                if (property.NameEquals("provisioningState"))
 32                {
 50433                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 50437                    provisioningState = property.Value.GetString();
 38                    continue;
 39                }
 40            }
 50441            return new ResourceGroupProperties(provisioningState);
 42        }
 43    }
 44}