< Summary

Class:Azure.Messaging.EventGrid.SystemEvents.SubscriptionDeletedEventData
Assembly:Azure.Messaging.EventGrid
File(s):C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\SubscriptionDeletedEventData.cs
C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\SubscriptionDeletedEventData.Serialization.cs
Covered lines:9
Uncovered lines:2
Coverable lines:11
Total lines:57
Line coverage:81.8% (9 of 11)
Covered branches:4
Total branches:4
Branch coverage:100% (4 of 4)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_EventSubscriptionId()-100%100%
DeserializeSubscriptionDeletedEventData(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\SubscriptionDeletedEventData.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.Messaging.EventGrid.SystemEvents
 9{
 10    /// <summary> Schema of the Data property of an EventGridEvent for a Microsoft.EventGrid.SubscriptionDeletedEvent. <
 11    public partial class SubscriptionDeletedEventData
 12    {
 13        /// <summary> Initializes a new instance of SubscriptionDeletedEventData. </summary>
 014        internal SubscriptionDeletedEventData()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of SubscriptionDeletedEventData. </summary>
 19        /// <param name="eventSubscriptionId"> The Azure resource ID of the deleted event subscription. </param>
 220        internal SubscriptionDeletedEventData(string eventSubscriptionId)
 21        {
 222            EventSubscriptionId = eventSubscriptionId;
 223        }
 24
 25        /// <summary> The Azure resource ID of the deleted event subscription. </summary>
 226        public string EventSubscriptionId { get; }
 27    }
 28}

C:\Git\azure-sdk-for-net\sdk\eventgrid\Azure.Messaging.EventGrid\src\Generated\Models\SubscriptionDeletedEventData.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.Messaging.EventGrid.SystemEvents
 12{
 13    public partial class SubscriptionDeletedEventData
 14    {
 15        internal static SubscriptionDeletedEventData DeserializeSubscriptionDeletedEventData(JsonElement element)
 16        {
 217            Optional<string> eventSubscriptionId = default;
 818            foreach (var property in element.EnumerateObject())
 19            {
 220                if (property.NameEquals("eventSubscriptionId"))
 21                {
 222                    eventSubscriptionId = property.Value.GetString();
 23                    continue;
 24                }
 25            }
 226            return new SubscriptionDeletedEventData(eventSubscriptionId.Value);
 27        }
 28    }
 29}