< Summary

Class:Azure.ResourceManager.Resources.Models.Deployment
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\Deployment.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\Deployment.Serialization.cs
Covered lines:22
Uncovered lines:6
Coverable lines:28
Total lines:85
Line coverage:78.5% (22 of 28)
Covered branches:7
Total branches:8
Branch coverage:87.5% (7 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-80%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\Deployment.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 Deployment
 15    {
 16        /// <summary> Initializes a new instance of Deployment. </summary>
 17        /// <param name="properties"> The deployment properties. </param>
 7618        public Deployment(DeploymentProperties properties)
 19        {
 7620            if (properties == null)
 21            {
 022                throw new ArgumentNullException(nameof(properties));
 23            }
 24
 7625            Properties = properties;
 7626        }
 27
 28        /// <summary> Initializes a new instance of Deployment. </summary>
 29        /// <param name="location"> The location to store the deployment data. </param>
 30        /// <param name="properties"> The deployment properties. </param>
 31        /// <param name="tags"> Deployment tags. </param>
 032        internal Deployment(string location, DeploymentProperties properties, IDictionary<string, string> tags)
 33        {
 034            Location = location;
 035            Properties = properties;
 036            Tags = tags;
 037        }
 38
 39        /// <summary> The location to store the deployment data. </summary>
 25640        public string Location { get; set; }
 41        /// <summary> The deployment properties. </summary>
 18442        public DeploymentProperties Properties { get; }
 43        /// <summary> Deployment tags. </summary>
 27644        public IDictionary<string, string> Tags { get; set; }
 45    }
 46}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\Deployment.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 Deployment : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 18417            writer.WriteStartObject();
 18418            if (Location != null)
 19            {
 5620                writer.WritePropertyName("location");
 5621                writer.WriteStringValue(Location);
 22            }
 18423            writer.WritePropertyName("properties");
 18424            writer.WriteObjectValue(Properties);
 18425            if (Tags != null)
 26            {
 7227                writer.WritePropertyName("tags");
 7228                writer.WriteStartObject();
 28829                foreach (var item in Tags)
 30                {
 7231                    writer.WritePropertyName(item.Key);
 7232                    writer.WriteStringValue(item.Value);
 33                }
 7234                writer.WriteEndObject();
 35            }
 18436            writer.WriteEndObject();
 18437        }
 38    }
 39}