public IBusInstance CreateBus(IBusRegistrationContext context, IEnumerable <IBusInstanceSpecification> specifications = null)
        {
            var testHarness = new GrpcTestHarness(specifications);

            testHarness.OnConfigureGrpcBus += configurator =>
            {
                var loggerFactory = context.GetService <ILoggerFactory>();
                if (loggerFactory != null)
                {
                    LogContext.ConfigureCurrentLogContext(loggerFactory);
                }

                configurator.ConfigureEndpoints(context);
            };

            return(new GrpcTestHarnessBusInstance(testHarness, context));
        }
 public GrpcTestHarnessBusInstance(GrpcTestHarness testHarness, IBusRegistrationContext busRegistrationContext)
 {
     _busRegistrationContext = busRegistrationContext;
     Harness = testHarness;
 }