Advanced Search
Search Results
2 total results found
Duplicating .NET Core DI
.NET
NOTE: If you are looking for how to access DI services, see this: HowTo Access DI Services Here are the steps to duplicating the .NET Dependency Injection process, to create a ServiceProvider instance. This is especially useful in unit testing, for classes an...
Unit Testing with IServiceProvider
.NET
When you create unit tests for class types that directly use DI to retrieve dependencies, you will need a way to give them a reference to a service provider (IServiceProvider). This is transparently done by the runtime.But, we have to mimic it for unit testin...