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