< Summary

Class:Azure.ResourceManager.Resources.Models.FeatureResult
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\FeatureResult.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\FeatureResult.Serialization.cs
Covered lines:27
Uncovered lines:6
Coverable lines:33
Total lines:103
Line coverage:81.8% (27 of 33)
Covered branches:18
Total branches:18
Branch coverage:100% (18 of 18)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Name()-0%100%
get_Properties()-0%100%
get_Id()-0%100%
get_Type()-0%100%
DeserializeFeatureResult(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\FeatureResult.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> Previewed feature information. </summary>
 11    public partial class FeatureResult
 12    {
 13        /// <summary> Initializes a new instance of FeatureResult. </summary>
 014        internal FeatureResult()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of FeatureResult. </summary>
 19        /// <param name="name"> The name of the feature. </param>
 20        /// <param name="properties"> Properties of the previewed feature. </param>
 21        /// <param name="id"> The resource ID of the feature. </param>
 22        /// <param name="type"> The resource type of the feature. </param>
 1623        internal FeatureResult(string name, FeatureProperties properties, string id, string type)
 24        {
 1625            Name = name;
 1626            Properties = properties;
 1627            Id = id;
 1628            Type = type;
 1629        }
 30
 31        /// <summary> The name of the feature. </summary>
 032        public string Name { get; }
 33        /// <summary> Properties of the previewed feature. </summary>
 034        public FeatureProperties Properties { get; }
 35        /// <summary> The resource ID of the feature. </summary>
 036        public string Id { get; }
 37        /// <summary> The resource type of the feature. </summary>
 038        public string Type { get; }
 39    }
 40}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\FeatureResult.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 FeatureResult
 14    {
 15        internal static FeatureResult DeserializeFeatureResult(JsonElement element)
 16        {
 1617            string name = default;
 1618            FeatureProperties properties = default;
 1619            string id = default;
 1620            string type = default;
 16021            foreach (var property in element.EnumerateObject())
 22            {
 6423                if (property.NameEquals("name"))
 24                {
 1625                    if (property.Value.ValueKind == JsonValueKind.Null)
 26                    {
 27                        continue;
 28                    }
 1629                    name = property.Value.GetString();
 1630                    continue;
 31                }
 4832                if (property.NameEquals("properties"))
 33                {
 1634                    if (property.Value.ValueKind == JsonValueKind.Null)
 35                    {
 36                        continue;
 37                    }
 1638                    properties = FeatureProperties.DeserializeFeatureProperties(property.Value);
 1639                    continue;
 40                }
 3241                if (property.NameEquals("id"))
 42                {
 1643                    if (property.Value.ValueKind == JsonValueKind.Null)
 44                    {
 45                        continue;
 46                    }
 1647                    id = property.Value.GetString();
 1648                    continue;
 49                }
 1650                if (property.NameEquals("type"))
 51                {
 1652                    if (property.Value.ValueKind == JsonValueKind.Null)
 53                    {
 54                        continue;
 55                    }
 1656                    type = property.Value.GetString();
 57                    continue;
 58                }
 59            }
 1660            return new FeatureResult(name, properties, id, type);
 61        }
 62    }
 63}