< Summary

Class:Azure.AI.TextAnalytics.Models.SentimentConfidenceScorePerLabel
Assembly:Azure.AI.TextAnalytics
File(s):C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\SentimentConfidenceScorePerLabel.cs
C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\SentimentConfidenceScorePerLabel.Serialization.cs
Covered lines:0
Uncovered lines:21
Coverable lines:21
Total lines:69
Line coverage:0% (0 of 21)
Covered branches:0
Total branches:8
Branch coverage:0% (0 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%100%
get_Positive()-0%100%
get_Neutral()-0%100%
get_Negative()-0%100%
DeserializeSentimentConfidenceScorePerLabel(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\SentimentConfidenceScorePerLabel.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.AI.TextAnalytics.Models
 9{
 10    /// <summary> Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, nega
 11    internal partial class SentimentConfidenceScorePerLabel
 12    {
 13        /// <summary> Initializes a new instance of SentimentConfidenceScorePerLabel. </summary>
 14        /// <param name="positive"> . </param>
 15        /// <param name="neutral"> . </param>
 16        /// <param name="negative"> . </param>
 017        internal SentimentConfidenceScorePerLabel(double positive, double neutral, double negative)
 18        {
 019            Positive = positive;
 020            Neutral = neutral;
 021            Negative = negative;
 022        }
 23
 024        public double Positive { get; }
 025        public double Neutral { get; }
 026        public double Negative { get; }
 27    }
 28}

C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\SentimentConfidenceScorePerLabel.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 SentimentConfidenceScorePerLabel
 14    {
 15        internal static SentimentConfidenceScorePerLabel DeserializeSentimentConfidenceScorePerLabel(JsonElement element
 16        {
 017            double positive = default;
 018            double neutral = default;
 019            double negative = default;
 020            foreach (var property in element.EnumerateObject())
 21            {
 022                if (property.NameEquals("positive"))
 23                {
 024                    positive = property.Value.GetDouble();
 025                    continue;
 26                }
 027                if (property.NameEquals("neutral"))
 28                {
 029                    neutral = property.Value.GetDouble();
 030                    continue;
 31                }
 032                if (property.NameEquals("negative"))
 33                {
 034                    negative = property.Value.GetDouble();
 35                    continue;
 36                }
 37            }
 038            return new SentimentConfidenceScorePerLabel(positive, neutral, negative);
 39        }
 40    }
 41}