-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IsRegistered<T> fails for registrations on parent containers #18
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using a SpecFlow runtime plugin and the RegisterGlobalDependencies event to add my own dependencies to the global SpecFlow container.
When I ask a sub-container (Feature- or ScenarioContainer) inside the test execution whether the dependency is registered through the IsRegistered call it returns always false. This is because IsRegistered only looks at the registrations of the current container, not the base container. Now the weird thing is that you can successfully call Resolve with the same interface and get the dependency. This is because Resolve will ask the base container for resolving the type if it cannot resolve the type itself whereas IsRegistered will not consult the base container.
This should be fixed by making IsRegistered also check the base container registrations.
The text was updated successfully, but these errors were encountered: