< Summary

Class:Azure.ResourceManager.EventHubs.Models.CheckNameAvailabilityParameter
Assembly:Azure.ResourceManager.EventHubs
File(s):C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\CheckNameAvailabilityParameter.cs
C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\CheckNameAvailabilityParameter.Serialization.cs
Covered lines:10
Uncovered lines:1
Coverable lines:11
Total lines:53
Line coverage:90.9% (10 of 11)
Covered branches:1
Total branches:2
Branch coverage:50% (1 of 2)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\CheckNameAvailabilityParameter.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.EventHubs.Models
 11{
 12    /// <summary> Parameter supplied to check Namespace name availability operation. </summary>
 13    public partial class CheckNameAvailabilityParameter
 14    {
 15        /// <summary> Initializes a new instance of CheckNameAvailabilityParameter. </summary>
 16        /// <param name="name"> Name to check the namespace name availability. </param>
 1617        public CheckNameAvailabilityParameter(string name)
 18        {
 1619            if (name == null)
 20            {
 021                throw new ArgumentNullException(nameof(name));
 22            }
 23
 1624            Name = name;
 1625        }
 26
 27        /// <summary> Name to check the namespace name availability. </summary>
 1628        public string Name { get; }
 29    }
 30}

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\Models\CheckNameAvailabilityParameter.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.EventHubs.Models
 12{
 13    public partial class CheckNameAvailabilityParameter : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 1617            writer.WriteStartObject();
 1618            writer.WritePropertyName("name");
 1619            writer.WriteStringValue(Name);
 1620            writer.WriteEndObject();
 1621        }
 22    }
 23}