< Summary

Class:Azure.Data.Tables.Models.TableItem
Assembly:Azure.Data.Tables
File(s):C:\Git\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src\Generated\Models\TableItem.cs
C:\Git\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src\Generated\Models\TableItem.Serialization.cs
Covered lines:24
Uncovered lines:5
Coverable lines:29
Total lines:87
Line coverage:82.7% (24 of 29)
Covered branches:10
Total branches:10
Branch coverage:100% (10 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_TableName()-100%100%
get_OdataType()-0%100%
get_OdataId()-0%100%
get_OdataEditLink()-0%100%
DeserializeTableItem(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src\Generated\Models\TableItem.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.Data.Tables.Models
 9{
 10    /// <summary> The properties for the table response. </summary>
 11    public partial class TableItem
 12    {
 13        /// <summary> Initializes a new instance of TableItem. </summary>
 014        internal TableItem()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of TableItem. </summary>
 19        /// <param name="tableName"> The name of the table. </param>
 20        /// <param name="odataType"> The odata type of the table. </param>
 21        /// <param name="odataId"> The id of the table. </param>
 22        /// <param name="odataEditLink"> The edit link of the table. </param>
 83223        internal TableItem(string tableName, string odataType, string odataId, string odataEditLink)
 24        {
 83225            TableName = tableName;
 83226            OdataType = odataType;
 83227            OdataId = odataId;
 83228            OdataEditLink = odataEditLink;
 83229        }
 30
 31        /// <summary> The name of the table. </summary>
 11432        public string TableName { get; }
 33        /// <summary> The odata type of the table. </summary>
 034        public string OdataType { get; }
 35        /// <summary> The id of the table. </summary>
 036        public string OdataId { get; }
 37        /// <summary> The edit link of the table. </summary>
 038        public string OdataEditLink { get; }
 39    }
 40}

C:\Git\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src\Generated\Models\TableItem.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.Data.Tables.Models
 12{
 13    public partial class TableItem
 14    {
 15        internal static TableItem DeserializeTableItem(JsonElement element)
 16        {
 19217            Optional<string> tableName = default;
 19218            Optional<string> odataType = default;
 19219            Optional<string> odataId = default;
 19220            Optional<string> odataEditLink = default;
 134421            foreach (var property in element.EnumerateObject())
 22            {
 48023                if (property.NameEquals("TableName"))
 24                {
 19225                    tableName = property.Value.GetString();
 19226                    continue;
 27                }
 28828                if (property.NameEquals("odata.type"))
 29                {
 9630                    odataType = property.Value.GetString();
 9631                    continue;
 32                }
 19233                if (property.NameEquals("odata.id"))
 34                {
 9635                    odataId = property.Value.GetString();
 9636                    continue;
 37                }
 9638                if (property.NameEquals("odata.editLink"))
 39                {
 9640                    odataEditLink = property.Value.GetString();
 41                    continue;
 42                }
 43            }
 19244            return new TableItem(tableName.Value, odataType.Value, odataId.Value, odataEditLink.Value);
 45        }
 46    }
 47}