< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Error()-100%100%
get_Properties()-100%100%
DeserializeDeploymentValidateResult(...)-72.73%80%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentValidateResult.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> Information from validate template deployment response. </summary>
 11    public partial class DeploymentValidateResult
 12    {
 13        /// <summary> Initializes a new instance of DeploymentValidateResult. </summary>
 014        internal DeploymentValidateResult()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of DeploymentValidateResult. </summary>
 19        /// <param name="error"> The deployment validation error. </param>
 20        /// <param name="properties"> The template deployment properties. </param>
 2821        internal DeploymentValidateResult(ErrorResponse error, DeploymentPropertiesExtended properties)
 22        {
 2823            Error = error;
 2824            Properties = properties;
 2825        }
 26
 27        /// <summary> The deployment validation error. </summary>
 2828        public ErrorResponse Error { get; }
 29        /// <summary> The template deployment properties. </summary>
 5630        public DeploymentPropertiesExtended Properties { get; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\DeploymentValidateResult.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 DeploymentValidateResult
 14    {
 15        internal static DeploymentValidateResult DeserializeDeploymentValidateResult(JsonElement element)
 16        {
 2817            ErrorResponse error = default;
 2818            DeploymentPropertiesExtended properties = default;
 32019            foreach (var property in element.EnumerateObject())
 20            {
 13221                if (property.NameEquals("error"))
 22                {
 023                    if (property.Value.ValueKind == JsonValueKind.Null)
 24                    {
 25                        continue;
 26                    }
 027                    error = ErrorResponse.DeserializeErrorResponse(property.Value);
 028                    continue;
 29                }
 13230                if (property.NameEquals("properties"))
 31                {
 2432                    if (property.Value.ValueKind == JsonValueKind.Null)
 33                    {
 34                        continue;
 35                    }
 2436                    properties = DeploymentPropertiesExtended.DeserializeDeploymentPropertiesExtended(property.Value);
 37                    continue;
 38                }
 39            }
 2840            return new DeploymentValidateResult(error, properties);
 41        }
 42    }
 43}