Cookies 🍪
We use third-party cookies to give the best experience across our site. Learn more in our Privacy Policy.
some code
[Fact]
public async Task MiddlewareTest_ReturnsNotFoundForRequest()
{
//some comment in code
using var host = await new HostBuilder()
.ConfigureWebHost(webBuilder =>
{
webBuilder
.UseTestServer()
.ConfigureServices(services =>
{
services.AddMyServices();
})
.Configure(app =>
{
app.UseMiddleware();
});
})
.StartAsync();
...
}
public void main()
{
//some ecample
//some comment in code
using var host = await new HostBuilder()
.ConfigureWebHost(webBuilder =>
{
webBuilder
.UseTestServer()
.ConfigureServices(services =>
{
services.AddMyServices();
})
.Configure(app =>
{
app.UseMiddleware
();
});
})
.StartAsync();
}