< Summary

Class:Azure.Analytics.Synapse.Spark.SparkClientOptions
Assembly:Azure.Analytics.Synapse.Spark
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Spark\src\Customization\SparkClientOptions.cs
Covered lines:7
Uncovered lines:2
Coverable lines:9
Total lines:48
Line coverage:77.7% (7 of 9)
Covered branches:1
Total branches:2
Branch coverage:50% (1 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_Default()-0%100%
.ctor(...)-85.71%50%
get_VersionString()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Spark\src\Customization\SparkClientOptions.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using Azure.Core;
 5using System;
 6
 7namespace Azure.Analytics.Synapse.Spark
 8{
 9    /// <summary>
 10    /// The options for <see cref="SparkBatchClient"/> and <see cref="SparkSessionClient"/>.
 11    /// </summary>
 12    public class SparkClientOptions : ClientOptions
 13    {
 14        private const ServiceVersion Latest = ServiceVersion.V2019_11_01_preview;
 15
 016        internal static SparkClientOptions Default { get; } = new SparkClientOptions();
 17
 18        /// <summary>
 19        /// Initializes a new instance of the <see cref="SparkClientOptions"/>.
 20        /// </summary>
 1621        public SparkClientOptions(ServiceVersion serviceVersion = Latest)
 22        {
 1623            VersionString = serviceVersion switch
 1624            {
 3225                ServiceVersion.V2019_11_01_preview => "2019-11-01-preview",
 026                _ => throw new ArgumentOutOfRangeException(nameof(serviceVersion))
 1627            };
 1628        }
 29
 30        /// <summary>
 31        /// API version for Spark job service.
 32        /// </summary>
 1633        internal string VersionString { get; }
 34
 35        /// <summary>
 36        /// The Synapse service version.
 37        /// </summary>
 38        public enum ServiceVersion
 39        {
 40            /// <summary>
 41            /// The 2019-06-01-preview of the template service.
 42            /// </summary>
 43#pragma warning disable CA1707
 44            V2019_11_01_preview = 1
 45#pragma warning restore CA1707
 46        }
 47    }
 48}