< Summary

Class:Azure.Iot.Hub.Service.Models.FaultInjectionConnectionProperties
Assembly:Azure.Iot.Hub.Service
File(s):C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Customized\Models\FaultInjectionConnectionProperties.cs
C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\FaultInjectionConnectionProperties.cs
C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\FaultInjectionConnectionProperties.Serialization.cs
Covered lines:0
Uncovered lines:26
Coverable lines:26
Total lines:90
Line coverage:0% (0 of 26)
Covered branches:0
Total branches:10
Branch coverage:0% (0 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_BlockDurationInMinutes()-100%100%
.ctor()-100%100%
.ctor(...)-100%100%
get_Action()-0%100%
.ctor()-0%100%
.ctor(...)-0%100%
get_BlockDurationInMinutes()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeFaultInjectionConnectionProperties(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Customized\Models\FaultInjectionConnectionProperties.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4namespace Azure.Iot.Hub.Service.Models
 5{
 6    internal partial class FaultInjectionConnectionProperties
 7    {
 8        /// <summary> The action to perform. </summary>
 09        internal FaultInjectionConnectionPropertiesAction? Action { get; set; }
 10    }
 11}

C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\FaultInjectionConnectionProperties.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.Iot.Hub.Service.Models
 9{
 10    /// <summary> The FaultInjectionConnectionProperties. </summary>
 11    internal partial class FaultInjectionConnectionProperties
 12    {
 13        /// <summary> Initializes a new instance of FaultInjectionConnectionProperties. </summary>
 014        public FaultInjectionConnectionProperties()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of FaultInjectionConnectionProperties. </summary>
 19        /// <param name="action"> The action to perform. </param>
 20        /// <param name="blockDurationInMinutes"> . </param>
 021        internal FaultInjectionConnectionProperties(FaultInjectionConnectionPropertiesAction? action, int? blockDuration
 22        {
 023            Action = action;
 024            BlockDurationInMinutes = blockDurationInMinutes;
 025        }
 026        public int? BlockDurationInMinutes { get; set; }
 27    }
 28}

C:\Git\azure-sdk-for-net\sdk\iot\Azure.Iot.Hub.Service\src\Generated\Models\FaultInjectionConnectionProperties.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.Iot.Hub.Service.Models
 12{
 13    internal partial class FaultInjectionConnectionProperties : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Optional.IsDefined(Action))
 19            {
 020                writer.WritePropertyName("action");
 021                writer.WriteStringValue(Action.Value.ToString());
 22            }
 023            if (Optional.IsDefined(BlockDurationInMinutes))
 24            {
 025                writer.WritePropertyName("blockDurationInMinutes");
 026                writer.WriteNumberValue(BlockDurationInMinutes.Value);
 27            }
 028            writer.WriteEndObject();
 029        }
 30
 31        internal static FaultInjectionConnectionProperties DeserializeFaultInjectionConnectionProperties(JsonElement ele
 32        {
 033            Optional<FaultInjectionConnectionPropertiesAction> action = default;
 034            Optional<int> blockDurationInMinutes = default;
 035            foreach (var property in element.EnumerateObject())
 36            {
 037                if (property.NameEquals("action"))
 38                {
 039                    action = new FaultInjectionConnectionPropertiesAction(property.Value.GetString());
 040                    continue;
 41                }
 042                if (property.NameEquals("blockDurationInMinutes"))
 43                {
 044                    blockDurationInMinutes = property.Value.GetInt32();
 45                    continue;
 46                }
 47            }
 048            return new FaultInjectionConnectionProperties(Optional.ToNullable(action), Optional.ToNullable(blockDuration
 49        }
 50    }
 51}