< Summary

Class:Azure.ResourceManager.Resources.Models.DeploymentWhatIf
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentWhatIf.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentWhatIf.Serialization.cs
Covered lines:14
Uncovered lines:5
Coverable lines:19
Total lines:69
Line coverage:73.6% (14 of 19)
Covered branches:3
Total branches:4
Branch coverage:75% (3 of 4)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentWhatIf.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;
 9
 10namespace Azure.ResourceManager.Resources.Models
 11{
 12    /// <summary> Deployment What-if operation parameters. </summary>
 13    public partial class DeploymentWhatIf
 14    {
 15        /// <summary> Initializes a new instance of DeploymentWhatIf. </summary>
 16        /// <param name="properties"> The deployment properties. </param>
 7617        public DeploymentWhatIf(DeploymentWhatIfProperties properties)
 18        {
 7619            if (properties == null)
 20            {
 021                throw new ArgumentNullException(nameof(properties));
 22            }
 23
 7624            Properties = properties;
 7625        }
 26
 27        /// <summary> Initializes a new instance of DeploymentWhatIf. </summary>
 28        /// <param name="location"> The location to store the deployment data. </param>
 29        /// <param name="properties"> The deployment properties. </param>
 030        internal DeploymentWhatIf(string location, DeploymentWhatIfProperties properties)
 31        {
 032            Location = location;
 033            Properties = properties;
 034        }
 35
 36        /// <summary> The location to store the deployment data. </summary>
 27237        public string Location { get; set; }
 38        /// <summary> The deployment properties. </summary>
 15239        public DeploymentWhatIfProperties Properties { get; }
 40    }
 41}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentWhatIf.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 DeploymentWhatIf : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 15217            writer.WriteStartObject();
 15218            if (Location != null)
 19            {
 8020                writer.WritePropertyName("location");
 8021                writer.WriteStringValue(Location);
 22            }
 15223            writer.WritePropertyName("properties");
 15224            writer.WriteObjectValue(Properties);
 15225            writer.WriteEndObject();
 15226        }
 27    }
 28}