Example #1
0
        public OrderCheckingAPITestServer BindServices(WebApplicationFactory <Gherkin.Core.LabAPI.Startup> labAPIServiceFactory)
        {
            _testServerBuilder.AddTestService <ILabProvider>(serviceCollection =>
            {
                serviceCollection.AddSingleton <ILabProvider>(sp =>
                {
                    return(new LabProvider(
                               sp.GetRequiredService <ILogger <LabProvider> >(),
                               labAPIServiceFactory.CreateClient()));
                });
            });

            return(this);
        }