< Summary

Class:Azure.Security.KeyVault.Certificates.CertificateBackup
Assembly:Azure.Security.KeyVault.Certificates
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Certificates\src\CertificateBackup.cs
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:28
Line coverage:0% (0 of 7)
Covered branches:0
Total branches:2
Branch coverage:0% (0 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.cctor()-0%100%
get_Value()-0%100%
Azure.Security.KeyVault.IJsonDeserializable.ReadProperties(...)-0%0%
Azure.Security.KeyVault.IJsonSerializable.WriteProperties(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Certificates\src\CertificateBackup.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System.Text.Json;
 5
 6namespace Azure.Security.KeyVault.Certificates
 7{
 8    internal class CertificateBackup : IJsonDeserializable, IJsonSerializable
 9    {
 10        private const string ValuePropertyName = "value";
 011        private static readonly JsonEncodedText s_valuePropertyNameBytes = JsonEncodedText.Encode(ValuePropertyName);
 12
 013        public byte[] Value { get; set; }
 14
 15        void IJsonDeserializable.ReadProperties(JsonElement json)
 16        {
 017            if (json.TryGetProperty(ValuePropertyName, out JsonElement value))
 18            {
 019                Value = Base64Url.Decode(value.GetString());
 20            }
 021        }
 22
 23        void IJsonSerializable.WriteProperties(Utf8JsonWriter json)
 24        {
 025            json.WriteString(s_valuePropertyNameBytes, Base64Url.Encode(Value));
 026        }
 27    }
 28}