< Summary

Class:Azure.AI.TextAnalytics.Models.LanguageInput
Assembly:Azure.AI.TextAnalytics
File(s):C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\LanguageInput.cs
C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\LanguageInput.Serialization.cs
Covered lines:19
Uncovered lines:2
Coverable lines:21
Total lines:69
Line coverage:90.4% (19 of 21)
Covered branches:4
Total branches:6
Branch coverage:66.6% (4 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-75%50%
get_Id()-100%100%
get_Text()-100%100%
get_CountryHint()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\LanguageInput.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.AI.TextAnalytics.Models
 11{
 12    /// <summary> The LanguageInput. </summary>
 13    internal partial class LanguageInput
 14    {
 15        /// <summary> Initializes a new instance of LanguageInput. </summary>
 16        /// <param name="id"> Unique, non-empty document identifier. </param>
 17        /// <param name="text"> . </param>
 18        /// <exception cref="ArgumentNullException"> <paramref name="id"/> or <paramref name="text"/> is null. </excepti
 9619        public LanguageInput(string id, string text)
 20        {
 9621            if (id == null)
 22            {
 023                throw new ArgumentNullException(nameof(id));
 24            }
 9625            if (text == null)
 26            {
 027                throw new ArgumentNullException(nameof(text));
 28            }
 29
 9630            Id = id;
 9631            Text = text;
 9632        }
 33
 34        /// <summary> Unique, non-empty document identifier. </summary>
 16035        public string Id { get; }
 9636        public string Text { get; }
 28837        public string CountryHint { get; set; }
 38    }
 39}

C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\LanguageInput.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.AI.TextAnalytics.Models
 12{
 13    internal partial class LanguageInput : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 9617            writer.WriteStartObject();
 9618            writer.WritePropertyName("id");
 9619            writer.WriteStringValue(Id);
 9620            writer.WritePropertyName("text");
 9621            writer.WriteStringValue(Text);
 9622            if (Optional.IsDefined(CountryHint))
 23            {
 9624                writer.WritePropertyName("countryHint");
 9625                writer.WriteStringValue(CountryHint);
 26            }
 9627            writer.WriteEndObject();
 9628        }
 29    }
 30}