< Summary

Class:Azure.ResourceManager.Resources.Models.ScopedDeployment
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ScopedDeployment.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ScopedDeployment.Serialization.cs
Covered lines:23
Uncovered lines:7
Coverable lines:30
Total lines:88
Line coverage:76.6% (23 of 30)
Covered branches:6
Total branches:8
Branch coverage:75% (6 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-75%50%
.ctor(...)-0%100%
get_Location()-100%100%
get_Properties()-100%100%
get_Tags()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ScopedDeployment.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;
 9using System.Collections.Generic;
 10
 11namespace Azure.ResourceManager.Resources.Models
 12{
 13    /// <summary> Deployment operation parameters. </summary>
 14    public partial class ScopedDeployment
 15    {
 16        /// <summary> Initializes a new instance of ScopedDeployment. </summary>
 17        /// <param name="location"> The location to store the deployment data. </param>
 18        /// <param name="properties"> The deployment properties. </param>
 419        public ScopedDeployment(string location, DeploymentProperties properties)
 20        {
 421            if (location == null)
 22            {
 023                throw new ArgumentNullException(nameof(location));
 24            }
 425            if (properties == null)
 26            {
 027                throw new ArgumentNullException(nameof(properties));
 28            }
 29
 430            Location = location;
 431            Properties = properties;
 432        }
 33
 34        /// <summary> Initializes a new instance of ScopedDeployment. </summary>
 35        /// <param name="location"> The location to store the deployment data. </param>
 36        /// <param name="properties"> The deployment properties. </param>
 37        /// <param name="tags"> Deployment tags. </param>
 038        internal ScopedDeployment(string location, DeploymentProperties properties, IDictionary<string, string> tags)
 39        {
 040            Location = location;
 041            Properties = properties;
 042            Tags = tags;
 043        }
 44
 45        /// <summary> The location to store the deployment data. </summary>
 1646        public string Location { get; }
 47        /// <summary> The deployment properties. </summary>
 1648        public DeploymentProperties Properties { get; }
 49        /// <summary> Deployment tags. </summary>
 3650        public IDictionary<string, string> Tags { get; set; }
 51    }
 52}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ScopedDeployment.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 ScopedDeployment : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 1617            writer.WriteStartObject();
 1618            writer.WritePropertyName("location");
 1619            writer.WriteStringValue(Location);
 1620            writer.WritePropertyName("properties");
 1621            writer.WriteObjectValue(Properties);
 1622            if (Tags != null)
 23            {
 1624                writer.WritePropertyName("tags");
 1625                writer.WriteStartObject();
 6426                foreach (var item in Tags)
 27                {
 1628                    writer.WritePropertyName(item.Key);
 1629                    writer.WriteStringValue(item.Value);
 30                }
 1631                writer.WriteEndObject();
 32            }
 1633            writer.WriteEndObject();
 1634        }
 35    }
 36}