DotnetDocsShow.MinimalApis
DotnetDocsShow.MinimalApis copied to clipboard
Another approach on Integration Testing
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!!