Created
June 6, 2017 20:34
-
-
Save zbartl/f25a009b0e7831ca519a80a2e1cbe577 to your computer and use it in GitHub Desktop.
aspnetcore integration test - startup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Startup | |
{ | |
... | |
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) | |
{ | |
... | |
app.UseIdentity(); | |
ConfigureAdditionalMiddleware(app); | |
app.UseMvc(); | |
} | |
protected virtual void ConfigureAdditionalMiddleware(IApplicationBuilder app) | |
{ | |
} | |
} | |
public class TestServerStartup : Startup | |
{ | |
public TestServerStartup(IHostingEnvironment env) : base(env) | |
{ | |
} | |
protected override void ConfigureAdditionalMiddleware(IApplicationBuilder app) | |
{ | |
app.UseMiddleware<TestMiddleware.AuthenticatedTestRequestMiddleware>(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment