// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IHttpClientFactory clientFactory) { AppInfoHelper.EnvironmentName = env.EnvironmentName; HttpClientHelper.HttpClientFactory = clientFactory; if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseStaticFiles(); app.UseRouting(); app.UseOssCore(new CoreContextOption() { JSRequestHeaderName = "x-core-app" }); if (!env.IsDevelopment()) { app.UseOssCoreException(); } app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); GlobalRegister.RegisterConfig(); }
static BaseTests() { SetConfig(); GlobalRegister.RegisterConfig(); InitialTestContext(); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { AppInfoHelper.EnvironmentName = env.EnvironmentName; if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseStaticFiles(); app.UseRouting(); if (!env.IsDevelopment()) { app.UseExceptionMiddleware(); } app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); GlobalRegister.RegisterConfig(); }
static BaseTests() { SetConfig(); GlobalRegister.RegisterConfig(); }