Elfocrash / DotnetDocsShow.MinimalApis

The code used in the .NET Docs Show on Minimal APIs

Home Page:https://www.youtube.com/watch?v=HDinmuGYaIA

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Another approach on Integration Testing

devjuanca opened this issue · 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!!