[QUERY] NotImplementedException when creating EventGridEvent for testing subscription validation event #35901
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Event Grid
feature-request
This issue requires a new behavior in the product in order be resolved.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
test-enhancement
Milestone
Library name and version
Azure.Messaging.EventGrid 4.13.0
Query/Question
Trying to unit test an Azure Function to confirm that it correctly handles a SubscriptionValidationEvent (at least verify that it returns 200), but it seems to be impossible to create a real EventGridEvent with SubscriptionValidationEventData as there is a NotImplemented method Write() when trying to serialize the data during the EventGridEvent constructor.
It seems that the EventGridModelFactory allowing me to create the data model indicates that this sort of thing should be possible, but it doesn't then seem to be set up so that I can actually create a system event from that data.
Is this intended behaviour?
Environment
.NET SDK (reflecting any global.json):
Version: 6.0.400
Commit: 7771abd614
Runtime Environment:
OS Name: Mac OS X
OS Version: 13.3
OS Platform: Darwin
RID: osx-arm64
Base Path: /usr/local/share/dotnet/sdk/6.0.400/
global.json file:
Not found
Host:
Version: 6.0.8
Architecture: arm64
Commit: 55fb7ef977
.NET SDKs installed:
6.0.400 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
The text was updated successfully, but these errors were encountered: