예제 #1
0
        private static async Task <EventGridTopicEndpoint> CreateAsync(EventSchema type, TestConfig config, ITestOutputHelper testOutput)
        {
            ServiceBusEventConsumerHost serviceBusEventConsumerHost =
                await CreateServiceBusEventConsumerHostAsync(
                    config.GetServiceBusTopicName(type),
                    config.GetServiceBusConnectionString(),
                    testOutput);

            return(new EventGridTopicEndpoint(type, serviceBusEventConsumerHost, config));
        }
예제 #2
0
        /// <summary>
        /// Creates a <see cref="EventGridTopicEndpoint"/> implementation that uses EventGridEvent's as input event schema.
        /// </summary>
        /// <param name="config">The configuration the build the endpoint.</param>
        /// <param name="testOutput">The test logger to write diagnostic messages during the availability of the endpoint.</param>
        public static async Task <EventGridTopicEndpoint> CreateForEventGridEventAsync(TestConfig config, ITestOutputHelper testOutput)
        {
            Guard.NotNull(config, nameof(config));
            Guard.NotNull(testOutput, nameof(testOutput));

            EventGridTopicEndpoint endpoint = await CreateAsync(EventSchema.EventGrid, config, testOutput);

            return(endpoint);
        }