Exemplo n.º 1
0
        public TestServer Create()
        {
            var bootstrap = new UsersApiBootstrap();
            var configuration = bootstrap.GetConfiguration();

            return TestServer.Create(
                app =>
                    {
                        var env = app.ApplicationServices.GetRequiredService<IHostingEnvironment>();
                        bootstrap.Configure(app, env, new NoopLoggerFactory(), configuration);
                    }, services => bootstrap.ConfigureServices(services, configuration));
        }
Exemplo n.º 2
0
        public TestServer Create()
        {
            var bootstrap     = new UsersApiBootstrap();
            var configuration = bootstrap.GetConfiguration();

            return(TestServer.Create(
                       app =>
            {
                var env = app.ApplicationServices.GetRequiredService <IHostingEnvironment>();
                bootstrap.Configure(app, env, new NoopLoggerFactory(), configuration);
            }, services => bootstrap.ConfigureServices(services, configuration)));
        }