Uh oh!
There was an error while loading. Please reload this page.
Explicit test for injecting scoped IServiceProvider (#63225) - #64558
Conversation
ghost
commented
Jan 31, 2022
Tagging subscribers to this area: @dotnet/area-extensions-dependencyinjection Issue DetailsAlternative to #63226 which only adds a new test without modifying the existing ones. The new test is analogous to the existing I have also updated
|
eerhardt
commented
Feb 7, 2022
Thanks for the contribution, @lord-executor! |
Alternative to #63226 which only adds a new test without modifying the existing ones.
The new test is analogous to the existing
SingletonServiceCanBeResolvedFromScopebut covers the more general (at least from my point of view) case of non-singleton injection.I have also updated
LightInjectDependencyInjectionSpecificationTeststo skip this new test since it otherwise fails on the last line of the testAssert.NotSame(fakeServiceFromScope1, fakeServiceFromScope2), meaning that LightInject actually injects the same scoped or transient service instance in both of the created service provider scopes - probably the result of making the originalSingletonServiceCanBeResolvedFromScopetest pass.