public async Task CanPublishCustomEvent() { EventGridPublisherClientOptions options = Recording.InstrumentClientOptions(new EventGridPublisherClientOptions()); EventGridPublisherClient client = InstrumentClient( new EventGridPublisherClient( new Uri(TestEnvironment.CustomEventTopicHost), new AzureKeyCredential(TestEnvironment.CustomEventTopicKey), options)); await client.PublishCustomEventsAsync(GetCustomEventsList()); }
public async Task CustomizeSerializedJSONPropertiesToCamelCase() { EventGridPublisherClientOptions options = Recording.InstrumentClientOptions(new EventGridPublisherClientOptions()); options.Serializer = new JsonObjectSerializer( new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase }); EventGridPublisherClient client = InstrumentClient( new EventGridPublisherClient( new Uri(TestEnvironment.CustomEventTopicHost), new AzureKeyCredential(TestEnvironment.CustomEventTopicKey), options)); await client.PublishCustomEventsAsync(GetCustomEventsList()); }