< Summary

Class:Azure.ResourceManager.Resources.Models.BasicDependency
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\BasicDependency.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\BasicDependency.Serialization.cs
Covered lines:21
Uncovered lines:5
Coverable lines:26
Total lines:89
Line coverage:80.7% (21 of 26)
Covered branches:14
Total branches:14
Branch coverage:100% (14 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Id()-0%100%
get_ResourceType()-0%100%
get_ResourceName()-0%100%
DeserializeBasicDependency(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\BasicDependency.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> Deployment dependency information. </summary>
 11    public partial class BasicDependency
 12    {
 13        /// <summary> Initializes a new instance of BasicDependency. </summary>
 014        internal BasicDependency()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of BasicDependency. </summary>
 19        /// <param name="id"> The ID of the dependency. </param>
 20        /// <param name="resourceType"> The dependency resource type. </param>
 21        /// <param name="resourceName"> The dependency resource name. </param>
 8422        internal BasicDependency(string id, string resourceType, string resourceName)
 23        {
 8424            Id = id;
 8425            ResourceType = resourceType;
 8426            ResourceName = resourceName;
 8427        }
 28
 29        /// <summary> The ID of the dependency. </summary>
 030        public string Id { get; }
 31        /// <summary> The dependency resource type. </summary>
 032        public string ResourceType { get; }
 33        /// <summary> The dependency resource name. </summary>
 034        public string ResourceName { get; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\BasicDependency.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 BasicDependency
 14    {
 15        internal static BasicDependency DeserializeBasicDependency(JsonElement element)
 16        {
 8417            string id = default;
 8418            string resourceType = default;
 8419            string resourceName = default;
 67220            foreach (var property in element.EnumerateObject())
 21            {
 25222                if (property.NameEquals("id"))
 23                {
 8424                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 8428                    id = property.Value.GetString();
 8429                    continue;
 30                }
 16831                if (property.NameEquals("resourceType"))
 32                {
 8433                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 8437                    resourceType = property.Value.GetString();
 8438                    continue;
 39                }
 8440                if (property.NameEquals("resourceName"))
 41                {
 8442                    if (property.Value.ValueKind == JsonValueKind.Null)
 43                    {
 44                        continue;
 45                    }
 8446                    resourceName = property.Value.GetString();
 47                    continue;
 48                }
 49            }
 8450            return new BasicDependency(id, resourceType, resourceName);
 51        }
 52    }
 53}