< Summary

Class:Azure.ResourceManager.Storage.Models.ObjectReplicationPolicies
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\ObjectReplicationPolicies.cs
C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\ObjectReplicationPolicies.Serialization.cs
Covered lines:14
Uncovered lines:3
Coverable lines:17
Total lines:76
Line coverage:82.3% (14 of 17)
Covered branches:9
Total branches:10
Branch coverage:90% (9 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Value()-100%100%
DeserializeObjectReplicationPolicies(...)-90.91%90%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\ObjectReplicationPolicies.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;
 9
 10namespace Azure.ResourceManager.Storage.Models
 11{
 12    /// <summary> List storage account object replication policies. </summary>
 13    public partial class ObjectReplicationPolicies
 14    {
 15        /// <summary> Initializes a new instance of ObjectReplicationPolicies. </summary>
 016        internal ObjectReplicationPolicies()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ObjectReplicationPolicies. </summary>
 21        /// <param name="value"> The replication policy between two storage accounts. </param>
 822        internal ObjectReplicationPolicies(IReadOnlyList<ObjectReplicationPolicy> value)
 23        {
 824            Value = value;
 825        }
 26
 27        /// <summary> The replication policy between two storage accounts. </summary>
 828        public IReadOnlyList<ObjectReplicationPolicy> Value { get; }
 29    }
 30}

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\ObjectReplicationPolicies.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.Storage.Models
 13{
 14    public partial class ObjectReplicationPolicies
 15    {
 16        internal static ObjectReplicationPolicies DeserializeObjectReplicationPolicies(JsonElement element)
 17        {
 818            IReadOnlyList<ObjectReplicationPolicy> value = default;
 3219            foreach (var property in element.EnumerateObject())
 20            {
 821                if (property.NameEquals("value"))
 22                {
 823                    if (property.Value.ValueKind == JsonValueKind.Null)
 24                    {
 25                        continue;
 26                    }
 827                    List<ObjectReplicationPolicy> array = new List<ObjectReplicationPolicy>();
 3228                    foreach (var item in property.Value.EnumerateArray())
 29                    {
 830                        if (item.ValueKind == JsonValueKind.Null)
 31                        {
 032                            array.Add(null);
 33                        }
 34                        else
 35                        {
 836                            array.Add(ObjectReplicationPolicy.DeserializeObjectReplicationPolicy(item));
 37                        }
 38                    }
 839                    value = array;
 40                    continue;
 41                }
 42            }
 843            return new ObjectReplicationPolicies(value);
 44        }
 45    }
 46}