< Summary

Class:Microsoft.Azure.KeyVault.Models.CertificateItem
Assembly:Microsoft.Azure.KeyVault
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Microsoft.Azure.KeyVault\src\Customized\CertificateItem.cs
C:\Git\azure-sdk-for-net\sdk\keyvault\Microsoft.Azure.KeyVault\src\Generated\Models\CertificateItem.cs
Covered lines:7
Uncovered lines:8
Coverable lines:15
Total lines:109
Line coverage:46.6% (7 of 15)
Covered branches:1
Total branches:2
Branch coverage:50% (1 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_Id()-100%100%
get_Attributes()-100%100%
get_Tags()-100%100%
get_X509Thumbprint()-100%100%
.ctor()-100%100%
.ctor(...)-100%100%
get_Identifier()-66.67%50%
.ctor()-100%100%
.ctor(...)-0%100%
get_Id()-100%100%
get_Attributes()-100%100%
get_Tags()-0%100%
get_X509Thumbprint()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Microsoft.Azure.KeyVault\src\Customized\CertificateItem.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License. See License.txt in the project root for
 3// license information.
 4
 5namespace Microsoft.Azure.KeyVault.Models
 6{
 7    /// <summary>
 8    /// The certificate item containing certificate metadata
 9    /// </summary>
 10    public partial class CertificateItem
 11    {
 12        /// <summary>
 13        /// The certificate identifier
 14        /// </summary>
 15        public CertificateIdentifier Identifier
 16        {
 17            get
 18            {
 619                if (!string.IsNullOrWhiteSpace(Id))
 620                    return new CertificateIdentifier(Id);
 21                else
 022                    return null;
 23            }
 24        }
 25    }
 26}

C:\Git\azure-sdk-for-net\sdk\keyvault\Microsoft.Azure.KeyVault\src\Generated\Models\CertificateItem.cs

#LineLine coverage
 1// <auto-generated>
 2// Copyright (c) Microsoft Corporation. All rights reserved.
 3// Licensed under the MIT License. See License.txt in the project root for
 4// license information.
 5//
 6// Code generated by Microsoft (R) AutoRest Code Generator.
 7// Changes may cause incorrect behavior and will be lost if the code is
 8// regenerated.
 9// </auto-generated>
 10
 11namespace Microsoft.Azure.KeyVault.Models
 12{
 13    using Microsoft.Rest;
 14    using Microsoft.Rest.Serialization;
 15    using Newtonsoft.Json;
 16    using System.Collections;
 17    using System.Collections.Generic;
 18    using System.Linq;
 19
 20    /// <summary>
 21    /// The certificate item containing certificate metadata.
 22    /// </summary>
 23    public partial class CertificateItem
 24    {
 25        /// <summary>
 26        /// Initializes a new instance of the CertificateItem class.
 27        /// </summary>
 728        public CertificateItem()
 29        {
 30            CustomInit();
 731        }
 32
 33        /// <summary>
 34        /// Initializes a new instance of the CertificateItem class.
 35        /// </summary>
 36        /// <param name="id">Certificate identifier.</param>
 37        /// <param name="attributes">The certificate management
 38        /// attributes.</param>
 39        /// <param name="tags">Application specific metadata in the form of
 40        /// key-value pairs.</param>
 41        /// <param name="x509Thumbprint">Thumbprint of the certificate.</param>
 042        public CertificateItem(string id = default(string), CertificateAttributes attributes = default(CertificateAttrib
 43        {
 044            Id = id;
 045            Attributes = attributes;
 046            Tags = tags;
 047            X509Thumbprint = x509Thumbprint;
 48            CustomInit();
 049        }
 50
 51        /// <summary>
 52        /// An initialization method that performs custom operations like setting defaults
 53        /// </summary>
 54        partial void CustomInit();
 55
 56        /// <summary>
 57        /// Gets or sets certificate identifier.
 58        /// </summary>
 59        [JsonProperty(PropertyName = "id")]
 1960        public string Id { get; set; }
 61
 62        /// <summary>
 63        /// Gets or sets the certificate management attributes.
 64        /// </summary>
 65        [JsonProperty(PropertyName = "attributes")]
 1766        public CertificateAttributes Attributes { get; set; }
 67
 68        /// <summary>
 69        /// Gets or sets application specific metadata in the form of key-value
 70        /// pairs.
 71        /// </summary>
 72        [JsonProperty(PropertyName = "tags")]
 073        public IDictionary<string, string> Tags { get; set; }
 74
 75        /// <summary>
 76        /// Gets or sets thumbprint of the certificate.
 77        /// </summary>
 78        [JsonConverter(typeof(Base64UrlJsonConverter))]
 79        [JsonProperty(PropertyName = "x5t")]
 1880        public byte[] X509Thumbprint { get; set; }
 81
 82    }
 83}