< Summary

Class:Azure.Analytics.Synapse.Artifacts.Models.BigDataPoolReference
Assembly:Azure.Analytics.Synapse.Artifacts
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\BigDataPoolReference.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\BigDataPoolReference.Serialization.cs
Covered lines:15
Uncovered lines:9
Coverable lines:24
Total lines:80
Line coverage:62.5% (15 of 24)
Covered branches:7
Total branches:8
Branch coverage:87.5% (7 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-83.33%50%
get_Type()-0%100%
get_ReferenceName()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%100%
DeserializeBigDataPoolReference(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\BigDataPoolReference.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.Analytics.Synapse.Artifacts.Models
 11{
 12    /// <summary> Big data pool reference. </summary>
 13    public partial class BigDataPoolReference
 14    {
 15        /// <summary> Initializes a new instance of BigDataPoolReference. </summary>
 16        /// <param name="type"> Big data pool reference type. </param>
 17        /// <param name="referenceName"> Reference big data pool name. </param>
 18        /// <exception cref="ArgumentNullException"> <paramref name="referenceName"/> is null. </exception>
 819        public BigDataPoolReference(BigDataPoolReferenceType type, string referenceName)
 20        {
 821            if (referenceName == null)
 22            {
 023                throw new ArgumentNullException(nameof(referenceName));
 24            }
 25
 826            Type = type;
 827            ReferenceName = referenceName;
 828        }
 29
 30        /// <summary> Big data pool reference type. </summary>
 031        public BigDataPoolReferenceType Type { get; set; }
 32        /// <summary> Reference big data pool name. </summary>
 1633        public string ReferenceName { get; set; }
 34    }
 35}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\BigDataPoolReference.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.Analytics.Synapse.Artifacts.Models
 12{
 13    public partial class BigDataPoolReference : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("type");
 019            writer.WriteStringValue(Type.ToString());
 020            writer.WritePropertyName("referenceName");
 021            writer.WriteStringValue(ReferenceName);
 022            writer.WriteEndObject();
 023        }
 24
 25        internal static BigDataPoolReference DeserializeBigDataPoolReference(JsonElement element)
 26        {
 827            BigDataPoolReferenceType type = default;
 828            string referenceName = default;
 4829            foreach (var property in element.EnumerateObject())
 30            {
 1631                if (property.NameEquals("type"))
 32                {
 833                    type = new BigDataPoolReferenceType(property.Value.GetString());
 834                    continue;
 35                }
 836                if (property.NameEquals("referenceName"))
 37                {
 838                    referenceName = property.Value.GetString();
 39                    continue;
 40                }
 41            }
 842            return new BigDataPoolReference(type, referenceName);
 43        }
 44    }
 45}