< Summary

Class:Azure.DigitalTwins.Core.QuerySpecification
Assembly:Azure.DigitalTwins.Core
File(s):C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.DigitalTwins.Core\src\Generated\Models\QuerySpecification.cs
C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.DigitalTwins.Core\src\Generated\Models\QuerySpecification.Serialization.cs
Covered lines:10
Uncovered lines:3
Coverable lines:13
Total lines:54
Line coverage:76.9% (10 of 13)
Covered branches:3
Total branches:4
Branch coverage:75% (3 of 4)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
get_Query()-100%100%
get_ContinuationToken()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-77.78%75%

File(s)

C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.DigitalTwins.Core\src\Generated\Models\QuerySpecification.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.DigitalTwins.Core
 9{
 10    /// <summary> A query specification containing either a query statement or a continuation token from a previous quer
 11    internal partial class QuerySpecification
 12    {
 13        /// <summary> Initializes a new instance of QuerySpecification. </summary>
 414        public QuerySpecification()
 15        {
 416        }
 17
 18        /// <summary> The query to execute. This value is ignored if a continuation token is provided. </summary>
 1219        public string Query { get; set; }
 20        /// <summary> A token which is used to retrieve the next set of results from a previous query. </summary>
 021        public string ContinuationToken { get; set; }
 22    }
 23}

C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.DigitalTwins.Core\src\Generated\Models\QuerySpecification.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.DigitalTwins.Core
 12{
 13    internal partial class QuerySpecification : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 417            writer.WriteStartObject();
 418            if (Optional.IsDefined(Query))
 19            {
 420                writer.WritePropertyName("query");
 421                writer.WriteStringValue(Query);
 22            }
 423            if (Optional.IsDefined(ContinuationToken))
 24            {
 025                writer.WritePropertyName("continuationToken");
 026                writer.WriteStringValue(ContinuationToken);
 27            }
 428            writer.WriteEndObject();
 429        }
 30    }
 31}