< Summary

Class:Azure.ResourceManager.DigitalTwins.Models.DigitalTwinsDescriptionListResult
Assembly:Azure.ResourceManager.DigitalTwins
File(s):C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.ResourceManager.DigitalTwins\src\Generated\Models\DigitalTwinsDescriptionListResult.cs
C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.ResourceManager.DigitalTwins\src\Generated\Models\DigitalTwinsDescriptionListResult.Serialization.cs
Covered lines:16
Uncovered lines:5
Coverable lines:21
Total lines:77
Line coverage:76.1% (16 of 21)
Covered branches:7
Total branches:8
Branch coverage:87.5% (7 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_NextLink()-100%100%
get_Value()-100%100%
DeserializeDigitalTwinsDescriptionListResult(...)-83.33%87.5%

File(s)

C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.ResourceManager.DigitalTwins\src\Generated\Models\DigitalTwinsDescriptionListResult.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.Collections.Generic;
 9using Azure.Core;
 10
 11namespace Azure.ResourceManager.DigitalTwins.Models
 12{
 13    /// <summary> A list of DigitalTwins description objects with a next link. </summary>
 14    public partial class DigitalTwinsDescriptionListResult
 15    {
 16        /// <summary> Initializes a new instance of DigitalTwinsDescriptionListResult. </summary>
 017        internal DigitalTwinsDescriptionListResult()
 18        {
 019            Value = new ChangeTrackingList<DigitalTwinsDescription>();
 020        }
 21
 22        /// <summary> Initializes a new instance of DigitalTwinsDescriptionListResult. </summary>
 23        /// <param name="nextLink"> The link used to get the next page of DigitalTwins description objects. </param>
 24        /// <param name="value"> A list of DigitalTwins description objects. </param>
 425        internal DigitalTwinsDescriptionListResult(string nextLink, IReadOnlyList<DigitalTwinsDescription> value)
 26        {
 427            NextLink = nextLink;
 428            Value = value;
 429        }
 30
 31        /// <summary> The link used to get the next page of DigitalTwins description objects. </summary>
 432        public string NextLink { get; }
 33        /// <summary> A list of DigitalTwins description objects. </summary>
 434        public IReadOnlyList<DigitalTwinsDescription> Value { get; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.ResourceManager.DigitalTwins\src\Generated\Models\DigitalTwinsDescriptionListResult.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.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.ResourceManager.DigitalTwins.Models
 13{
 14    public partial class DigitalTwinsDescriptionListResult
 15    {
 16        internal static DigitalTwinsDescriptionListResult DeserializeDigitalTwinsDescriptionListResult(JsonElement eleme
 17        {
 418            Optional<string> nextLink = default;
 419            Optional<IReadOnlyList<DigitalTwinsDescription>> value = default;
 1620            foreach (var property in element.EnumerateObject())
 21            {
 422                if (property.NameEquals("nextLink"))
 23                {
 024                    nextLink = property.Value.GetString();
 025                    continue;
 26                }
 427                if (property.NameEquals("value"))
 28                {
 429                    List<DigitalTwinsDescription> array = new List<DigitalTwinsDescription>();
 7630                    foreach (var item in property.Value.EnumerateArray())
 31                    {
 3432                        array.Add(DigitalTwinsDescription.DeserializeDigitalTwinsDescription(item));
 33                    }
 434                    value = array;
 35                    continue;
 36                }
 37            }
 438            return new DigitalTwinsDescriptionListResult(nextLink.Value, Optional.ToList(value));
 39        }
 40    }
 41}