You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We get many issues related to how to override different things for integration tests.
All of these questions are never related to our integration testing support but about how DI works and how to effectively replace services for testing.
This requires a proper understanding of the semantics of the service collection and how the service provider is built.
There are no docs for it on the official documentation.
The ask here is to include a couple of sections on DI (and potentially hosting too) explaining how all this works. Specifically:
In the hosting docs, explain the order in which ConfigureServices callbacks get scheduled.
Include an example with an app calling host.ConfigureServices before calling webHost.UseStartup and then host.ConfigureServices after it, to demonstrate the order in which the callbacks get run. Something like (note it's hand-coded on this comment)
This issue has been closed as part of the issue backlog grooming process outlined in #22351.
That automated process may have closed some issues that should be addressed. If you think this is one of them, reopen it with a comment explaining why. Tag the @dotnet/docs team for visibility.
Uh oh!
There was an error while loading. Please reload this page.
The ask here is to include a couple of sections on DI (and potentially hosting too) explaining how all this works. Specifically:
host.ConfigureServices
before callingwebHost.UseStartup
and thenhost.ConfigureServices
after it, to demonstrate the order in which the callbacks get run. Something like (note it's hand-coded on this comment)Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: