< Summary

Class:Azure.ResourceManager.Resources.Models.TenantListResult
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\TenantListResult.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\TenantListResult.Serialization.cs
Covered lines:18
Uncovered lines:8
Coverable lines:26
Total lines:94
Line coverage:69.2% (18 of 26)
Covered branches:9
Total branches:14
Branch coverage:64.2% (9 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-100%100%
get_Value()-100%100%
get_NextLink()-100%100%
DeserializeTenantListResult(...)-80%75%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\TenantListResult.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;
 9using System.Collections.Generic;
 10
 11namespace Azure.ResourceManager.Resources.Models
 12{
 13    /// <summary> Tenant Ids information. </summary>
 14    public partial class TenantListResult
 15    {
 16        /// <summary> Initializes a new instance of TenantListResult. </summary>
 17        /// <param name="nextLink"> The URL to use for getting the next set of results. </param>
 018        internal TenantListResult(string nextLink)
 19        {
 020            if (nextLink == null)
 21            {
 022                throw new ArgumentNullException(nameof(nextLink));
 23            }
 24
 025            NextLink = nextLink;
 026        }
 27
 28        /// <summary> Initializes a new instance of TenantListResult. </summary>
 29        /// <param name="value"> An array of tenants. </param>
 30        /// <param name="nextLink"> The URL to use for getting the next set of results. </param>
 431        internal TenantListResult(IReadOnlyList<TenantIdDescription> value, string nextLink)
 32        {
 433            Value = value;
 434            NextLink = nextLink;
 435        }
 36
 37        /// <summary> An array of tenants. </summary>
 438        public IReadOnlyList<TenantIdDescription> Value { get; }
 39        /// <summary> The URL to use for getting the next set of results. </summary>
 440        public string NextLink { get; }
 41    }
 42}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\TenantListResult.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.Resources.Models
 13{
 14    public partial class TenantListResult
 15    {
 16        internal static TenantListResult DeserializeTenantListResult(JsonElement element)
 17        {
 418            IReadOnlyList<TenantIdDescription> value = default;
 419            string nextLink = default;
 1620            foreach (var property in element.EnumerateObject())
 21            {
 422                if (property.NameEquals("value"))
 23                {
 424                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 428                    List<TenantIdDescription> array = new List<TenantIdDescription>();
 1629                    foreach (var item in property.Value.EnumerateArray())
 30                    {
 431                        if (item.ValueKind == JsonValueKind.Null)
 32                        {
 033                            array.Add(null);
 34                        }
 35                        else
 36                        {
 437                            array.Add(TenantIdDescription.DeserializeTenantIdDescription(item));
 38                        }
 39                    }
 440                    value = array;
 441                    continue;
 42                }
 043                if (property.NameEquals("nextLink"))
 44                {
 045                    nextLink = property.Value.GetString();
 46                    continue;
 47                }
 48            }
 449            return new TenantListResult(value, nextLink);
 50        }
 51    }
 52}