DotnetDocsShow.MinimalApis icon indicating copy to clipboard operation
DotnetDocsShow.MinimalApis copied to clipboard

Another approach on Integration Testing

Open devjuanca opened this issue 3 years ago • 0 comments

I'm pro minimal api. And this repo is great. Regarding to the integration tests what I did instead of mocking services was adding builder.UseEnvironment("Testing"); in the TestApplicationFactory class - CreateHost(IHostBuilder builder). Then I added an appsettings.Testing.json file in the api project with the configuration that I wanted just fot testing (like a connection string to a Testing Database).

Thank you for all your work in the community!!

devjuanca avatar Jan 11 '22 21:01 devjuanca