< Summary

Class:Azure.ResourceManager.Resources.Models.FeatureProperties
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\FeatureProperties.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\FeatureProperties.Serialization.cs
Covered lines:9
Uncovered lines:3
Coverable lines:12
Total lines:61
Line coverage:75% (9 of 12)
Covered branches:6
Total branches:6
Branch coverage:100% (6 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_State()-0%100%
DeserializeFeatureProperties(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\FeatureProperties.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> Information about feature. </summary>
 11    public partial class FeatureProperties
 12    {
 13        /// <summary> Initializes a new instance of FeatureProperties. </summary>
 014        internal FeatureProperties()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of FeatureProperties. </summary>
 19        /// <param name="state"> The registration state of the feature for the subscription. </param>
 1620        internal FeatureProperties(string state)
 21        {
 1622            State = state;
 1623        }
 24
 25        /// <summary> The registration state of the feature for the subscription. </summary>
 026        public string State { get; }
 27    }
 28}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\FeatureProperties.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 FeatureProperties
 14    {
 15        internal static FeatureProperties DeserializeFeatureProperties(JsonElement element)
 16        {
 1617            string state = default;
 6418            foreach (var property in element.EnumerateObject())
 19            {
 1620                if (property.NameEquals("state"))
 21                {
 1622                    if (property.Value.ValueKind == JsonValueKind.Null)
 23                    {
 24                        continue;
 25                    }
 1626                    state = property.Value.GetString();
 27                    continue;
 28                }
 29            }
 1630            return new FeatureProperties(state);
 31        }
 32    }
 33}