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

@Tested(fullyInitialized = true) should look up for a loaded dependency class when type of dependency is an interface #191

rliesenfeld opened this issue Jul 16, 2015 · 0 comments


Copy link

@rliesenfeld rliesenfeld commented Jul 16, 2015

Currently, injected dependencies whose field declaration type is an interface are ignored when using "fullyInitialized = true" and there is no matching @Injectable.

To support such dependencies, we can try and find an already loaded class which implements the interface, in order for it to be instantiated. If more than one such class is found, however, the dependency would still be left null. This way, test code can choose which implementation class to use by simply ensuring the class is loaded by the JVM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

No branches or pull requests

1 participant