< Summary

Class:Azure.ResourceManager.Storage.Models.DateAfterCreation
Assembly:Azure.ResourceManager.Storage
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\DateAfterCreation.cs
C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\DateAfterCreation.Serialization.cs
Covered lines:14
Uncovered lines:0
Coverable lines:14
Total lines:60
Line coverage:100% (14 of 14)
Covered branches:4
Total branches:4
Branch coverage:100% (4 of 4)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
get_DaysAfterCreationGreaterThan()-100%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-100%100%
DeserializeDateAfterCreation(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\DateAfterCreation.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.ResourceManager.Storage.Models
 9{
 10    /// <summary> Object to define the number of days after creation. </summary>
 11    public partial class DateAfterCreation
 12    {
 13        /// <summary> Initializes a new instance of DateAfterCreation. </summary>
 14        /// <param name="daysAfterCreationGreaterThan"> Value indicating the age in days after creation. </param>
 2415        public DateAfterCreation(float daysAfterCreationGreaterThan)
 16        {
 2417            DaysAfterCreationGreaterThan = daysAfterCreationGreaterThan;
 2418        }
 19
 20        /// <summary> Value indicating the age in days after creation. </summary>
 6421        public float DaysAfterCreationGreaterThan { get; set; }
 22    }
 23}

C:\Git\azure-sdk-for-net\sdk\storage\Azure.ResourceManager.Storage\src\Generated\Models\DateAfterCreation.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.ResourceManager.Storage.Models
 12{
 13    public partial class DateAfterCreation : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 817            writer.WriteStartObject();
 818            writer.WritePropertyName("daysAfterCreationGreaterThan");
 819            writer.WriteNumberValue(DaysAfterCreationGreaterThan);
 820            writer.WriteEndObject();
 821        }
 22
 23        internal static DateAfterCreation DeserializeDateAfterCreation(JsonElement element)
 24        {
 1625            float daysAfterCreationGreaterThan = default;
 6426            foreach (var property in element.EnumerateObject())
 27            {
 1628                if (property.NameEquals("daysAfterCreationGreaterThan"))
 29                {
 1630                    daysAfterCreationGreaterThan = property.Value.GetSingle();
 31                    continue;
 32                }
 33            }
 1634            return new DateAfterCreation(daysAfterCreationGreaterThan);
 35        }
 36    }
 37}