< Summary

Class:Azure.Security.KeyVault.Secrets.SecretBackup
Assembly:Azure.Security.KeyVault.Secrets
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Secrets\src\SecretBackup.cs
Covered lines:6
Uncovered lines:0
Coverable lines:6
Total lines:25
Line coverage:100% (6 of 6)
Covered branches:2
Total branches:2
Branch coverage:100% (2 of 2)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Secrets\src\SecretBackup.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.Secrets
 7{
 8    internal class SecretBackup : IJsonDeserializable, IJsonSerializable
 9    {
 1610        public byte[] Value { get; set; }
 11
 12        void IJsonDeserializable.ReadProperties(JsonElement json)
 13        {
 414            if (json.TryGetProperty("value", out JsonElement value))
 15            {
 416                Value = Base64Url.Decode(value.GetString());
 17            }
 418        }
 19
 20        void IJsonSerializable.WriteProperties(Utf8JsonWriter json)
 21        {
 422            json.WriteString("value", Base64Url.Encode(Value));
 423        }
 24    }
 25}