Skip to content
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

Open
Cylox opened this issue Aug 20, 2018 · 1 comment · May be fixed by #20
Open

IsRegistered<T> fails for registrations on parent containers #18

Cylox opened this issue Aug 20, 2018 · 1 comment · May be fixed by #20

Comments

@Cylox
Copy link

Cylox commented Aug 20, 2018

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.

@patrickdreyer patrickdreyer linked a pull request Dec 6, 2018 that will close this issue
@patrickdreyer
Copy link

Pull request #20 includes a fix for your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants